Jump to:

23358 Posts in 17875 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Performance without cache

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

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

Page: 1
Go to End
Author Topic: 1319 Views
  • KungK
    Avatar
    Community Member
    14 Posts

    Performance without cache Link to this post

    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
    ============================================================================

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: Performance without cache Link to this post

    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?

  • KungK
    Avatar
    Community Member
    14 Posts

    Re: Performance without cache Link to this post

    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.

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: Performance without cache Link to this post

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

  • KungK
    Avatar
    Community Member
    14 Posts

    Re: Performance without cache Link to this post

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

    Thanks a lot for your time and answers!

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: Performance without cache Link to this post

    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.

    1319 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.