In getting ready to optimize some templates for speed, I started looking over the mailing list for anything that talked about the overhead in fetching certain Bricolage objects using the API. One of the most relevant comments seemed to be this one from David just a few months ago when we were discussing large Bricolage installs:
http://www.gossamer-threads.com/lists/bricolage/users/38218#38218
"Well, yes, except that the slowness of publishing is not due to the speed of the database, but to the amount of data loaded from the database. So if you republish your home page, and the template loads the 25 most recent stories from the database, and then loads any of the elements from those 25 stories (such as a teaser field), then that's a lot of data that gets queried."
So this is my question to the list, keeping in mind that the mason and Perl code you're using will have a large impact on this: Are there some API calls that are better to use than others? Do you gain anything by focusing on pulling relatively small asset objects like Title, slug, description as opposed to elements in stories? If you're trying to make a template run faster, what sorts of API calls do you look to cut out? Is the question purely one of memory or are there other factors at play?
Sorry if the question is somewhat noobish, I haven't seen anything in the docs on this issue.
-Matt
http://www.gossamer-threads.com/lists/bricolage/users/38218#38218
"Well, yes, except that the slowness of publishing is not due to the speed of the database, but to the amount of data loaded from the database. So if you republish your home page, and the template loads the 25 most recent stories from the database, and then loads any of the elements from those 25 stories (such as a teaser field), then that's a lot of data that gets queried."
So this is my question to the list, keeping in mind that the mason and Perl code you're using will have a large impact on this: Are there some API calls that are better to use than others? Do you gain anything by focusing on pulling relatively small asset objects like Title, slug, description as opposed to elements in stories? If you're trying to make a template run faster, what sorts of API calls do you look to cut out? Is the question purely one of memory or are there other factors at play?
Sorry if the question is somewhat noobish, I haven't seen anything in the docs on this issue.
-Matt