Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Performance without cache


Go to End


6 Posts   2151 Views

Avatar
KungK

Community Member, 14 Posts

17 February 2011 at 3:11am

Edited: 17/02/2011 3:23am

Hi,

I have a problem. I've built a basic SilverStripe site that has very few visitors.
So when the visitor enters the site and the cache needs to be renewed it takes about 1min to load the page.

Is there any fix for this? I've tried to find a fix for it but everything I find is "use the cache". Imo with or without cache 1min loading times are way to much.

Any help is appreciated! I really like developing with SilverStripe and would it suck to see it fall on the performance.

Ps. I use one.com to host the site.

This is my debug_profile=1 (which doesn't even show the true loading time):

============================================================================
                              PROFILER OUTPUT
============================================================================
Calls                    Time  Routine
-----------------------------------------------------------------------------
  2    210.7491 ms (44.50 %)  SSViewer::process - compile
  1    174.8610 ms (36.93 %)  all_execution
  2    16.7458 ms (3.54 %)  SSViewer::process
 10    15.6310 ms (3.30 %)  obj.Link
  8    12.2018 ms (2.58 %)  obj.Children
  2    10.7191 ms (2.26 %)  Requirements::includeInHTML
  1    7.0491 ms (1.49 %)  DB::connect
 10    6.4192 ms (1.36 %)  obj.LinkingMode
  1    3.5939 ms (0.76 %)  obj.Content
  1    3.3550 ms (0.71 %)  obj.Menu
  2    1.0102 ms (0.21 %)  obj.MetaTitle
  1    0.9551 ms (0.20 %)  obj.MetaTags
 10    0.8953 ms (0.19 %)  obj.MenuTitle
 10    0.8833 ms (0.19 %)  obj.Description
  1    0.1781 ms (0.04 %)  obj.Title
  1    0.1509 ms (0.03 %)  obj.Form
  1    0.0801 ms (0.02 %)  obj.SiteConfig
  1    0.0720 ms (0.02 %)  obj.Layout
  1    0.0339 ms (0.01 %)  main.php init
  1    0.0172 ms (0.00 %)  unprofiled

       7.9401 ms (1.68 %)  Missed
============================================================================
       473.5410 ms (100.00 %)  OVERALL TIME
============================================================================

Avatar
swaiba

Forum Moderator, 1899 Posts

17 February 2011 at 3:41am

the cache should only need to be recreated once - then it is reused over and over. AFAIK it's not going to be easy to speed up the re-create of the cache. Is something not triggering the re-create? have you created a 'silverstripe-cache' folder in your webroot?

Avatar
KungK

Community Member, 14 Posts

17 February 2011 at 4:08am

I get the long loading time when no one have entered the site in a while (don't know how long).
The cache does work, I have the 'silverstripe-cache' folder and it gets filled with files.

Can I some how set the cache life time to unlimited and that way only recreate the cache manually? Cause the sites content wont be updated that often.

Avatar
swaiba

Forum Moderator, 1899 Posts

17 February 2011 at 4:11am

If I were you I'd look into static publishing - skip the cache altogether...
http://doc.silverstripe.org/sapphire/en/reference/staticpublisher

Avatar
KungK

Community Member, 14 Posts

17 February 2011 at 4:25am

Awesome!
Looks really promising.. Will definitely try it out.

Thanks a lot for your time and answers!

Avatar
Willr

Forum Moderator, 5523 Posts

18 February 2011 at 6:57pm

If debug profile is reporting 473.5410 ms (100.00 %) OVERALL TIME and you think it's taking ~10 seconds then you may want to investigate other bottle necks as well. Possible things include connection to the server (loading javascript/ images and other front end files) or connecting to the database (esp if this is over a secure connection). If connecting to the database is super slow in your environment like swaiba said - try static publisher. Doesn't get much faster than serving html files.