I am using Stash only recently and was wondering how the performance is boosted over using embeds? I know there are a few less queries used in general, and I know you can subvert the parse order, but is there better reason to use it in templates?
I made a simple blog page with embeds and one with a layout partial and stash for the same exact content and there was little or no difference in {elapsed_time} - however for some reason there was one more query for the 'stashed' version.
The effort it is taking to think 'inside out' with stash, I am wondering what the big benefit it is over embeds with good caching?
This code would be included in an embed:
{exp:channel:entries channel="blog" limit="3"}
<div class="recent-post">
<a href="{site_url}blog/{url_title}" class="thumb">{exp:ce_img:single src="{blog_image}" height="54" width="54" crop="yes"}</a>
<div class="post-head">
<a href="{site_url}blog/{url_title}">{title}</a><span>{entry_date format="%d/%m/%Y"}</span>
</div>
</div>
{/exp:channel:entries}
Vs this 'stashed':
{exp:channel:entries channel="blog" limit="3"}
{exp:stash:append name="recent_blogs"}
<div class="recent-post">
<a href="{site_url}blog/{url_title}" class="thumb">{exp:ce_img:single src="{blog_image}" height="54" width="54" crop="yes"}</a>
<div class="post-head">
<a href="{site_url}blog/{url_title}">{title}</a><span>{entry_date format="%d/%m/%Y"}</span>
</div>
</div>
{/exp:stash:append}
{/exp:channel:entries}
{exp:stash:get name="recent_blogs"}