silverstripe-blog icon indicating copy to clipboard operation
silverstripe-blog copied to clipboard

Suspicion: poor performance loading blog posts on frontend

Open robbieaverill opened this issue 6 years ago • 3 comments

I've set up a vanilla CWP 2.x-dev site with blog, comments, comment notifications etc (the silverstripe/recipe-blog dependencies), added a blog with two blog posts and three comments on one of the posts, a couple of images inline in the content as well as featured images.

Loading the homepage for me takes around 500ms.

Loading the blog takes around 1.4s.

I haven't looked into this at all, but I suspect a little bit of profiling might surface some areas that could be tweaked to reduce this load time a little.

robbieaverill avatar Mar 20 '18 21:03 robbieaverill

Here's my debugbar profile of a simple blog with two posts in it: image

robbieaverill avatar Apr 29 '19 21:04 robbieaverill

Can confirm this is an issue. Also affects the rss feed generation hugely.

camfindlay avatar Jul 11 '19 01:07 camfindlay

In my use case the slowness seemed to be due to DBHTMLText parsing shortcodes. I could speed the page up considerably by disabling this within BlogPost::Excerpt like so

$content->setOptions(['shortcodes' => false]);

However, for any posts with shortcodes like embedded videos, it would make the auto summary look bad.

matt-in-a-hat avatar Jul 16 '19 03:07 matt-in-a-hat