Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Diagnosing slow performance of Smarty

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
tenori
Smarty n00b


Joined: 04 Aug 2019
Posts: 2

PostPosted: Sun Aug 04, 2019 10:11 pm    Post subject: Diagnosing slow performance of Smarty Reply with quote

Hi everyone,

Smarty is taking around 1 second to render our templates (we're hosting in Google AppEngine if that makes any difference), and I'm trying to find out why

Locally the performance is significantly better though still fairly long (0.2 seconds), and the templates don't seem crazy complicated and the page is small. I've tried removing various bits from the template but there doesn't seem to be any one culprit.

If I turn on debugging, this is what I see:

marty 3.1.33 Debug Console - "file:cms_index.tpl" Total Time 0.98546
included templates & config files (load time in seconds)
/srv/templates/cms_index.tpl
(compile 0.00000) (render 0.68710) (cache 0.00000)
/srv/templates/cms_header.tpl
(compile 0.00000) (render 0.16921) (cache 0.00000)
/srv/templates/google_analytics.tpl
(compile 0.00000) (render 0.04287) (cache 0.00000)
/srv/templates/cms_topmenu.tpl
(compile 0.00000) (render 0.04959) (cache 0.00000)
/srv/templates/start-market.tpl
(compile 0.00000) (render 0.04356) (cache 0.00000)
/srv/templates/cms_footer.tpl
(compile 0.00000) (render 0.06557) (cache 0.00000)

Any ideas what I should be looking at?

I've turned compile_check off, turned merge_compiled_includes on, we're not using caching (we could only use this on a small subset of pages anyway), not sure what else to look for?

Thanks

J
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Wed Aug 07, 2019 7:05 am    Post subject: Reply with quote

My first guess is likely because in AppEngine it compiling templates every time, while locally it is using caching.
Back to top
View user's profile Send private message
tenori
Smarty n00b


Joined: 04 Aug 2019
Posts: 2

PostPosted: Wed Aug 07, 2019 7:26 am    Post subject: Reply with quote

Thanks for the suggestion AnrDaemon Smile How do I check that?

The trace shows 0 time being spent compiling (after the first load), and I'd disabled compile_check so I don't *think* that's the case - but could obviously be wrong here!
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sun Aug 11, 2019 6:01 pm    Post subject: Reply with quote

I don't have a ready answer, sorry.
Usually, I just inspect with my own eyes.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP