• Resolved abhisekpadhi

    (@abhisekpadhi)


    My site is a woocommerce based website, I use some 40 plugins to add functionality to woocommerce store. There are 8000+ products. Using autoptimize gives me a performance boost of decreasing the http requests by combining js and css files.

    Unfortunately the cache size is increasing beyond 1.5GB sometimes its 2Gb and more. /var/www/html/wp-content/cache/autoptimize/js is alone 1.5 Gb and /css is just some Mb’s. And the pages load slower.

    I disable autoptimize pages load faster, test with gtmetrix.com, No of requests increases to 100+ but page load time is below 5Sec for each page.

    My site config: (From caching perspective)
    Hosted with AWS Ec2+RDS
    w3 total cache (only browser caching + CDN with s3)
    Nginx fastcgi cache (disk based on /var/cache/nginx not tmpfs)
    Php5.6 opcache
    Rocket Lazy Load plugin

    Autoptimize settings: (Enabled only)
    -Optimize HTML Code?
    -Optimize JavaScript Code?
    -Also aggregate inline JS?
    -Add try-catch wrapping?
    -Optimize CSS Code?
    -Save aggregated script/css as static files?

    For the time being I’m disabling autoptimize in the production site, to provide faster load time to visitors, rather focussing on Gtmetrix scores.

    Would love to hear you suggestions on optimizations.

    https://www.ads-software.com/plugins/autoptimize/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello abhisekpadhi,

    Your website almost certainly has page and/or request specific scripts. Aggregating such scripts will bloat your cache and slow your site as AO has to produce a new file for each page/request.

    Exclude the jQuery library (jquery.js or jquery.min.js depending on which you’re using) as well as inline scripts from aggregation. Doing so should solve the cache issue and improve your website’s user experience centered performance metrics immensely.

    Be well,
    AJ

    Thread Starter abhisekpadhi

    (@abhisekpadhi)

    I have already excluded them. Not only that I’ve also excluded some of other js files of 2 other plugins.

    1. Woocommerce Predictive search (backbone.min.js and backbone.localstore.js) – Excluding these files fix the search functionality
    2. Woocommerce product filter (premium plugin) js files

    Btw, I’ve just put the filname.js in the list of excluded js files like : file1.js, fil2.js, file3.js

    So, is that an issue ?

    Do i have to put like = file1,file2,file3 ….

    But excluding the files of my plugins (using file1.js, file2.js…) I do see the effect of them being excluded.

    You are not aggregating inline CSS, correct? And can you share the homepage URL?

    Thread Starter abhisekpadhi

    (@abhisekpadhi)

    Nope I’m not aggregating inline CSS, because it is breaking some css that are dynamically added by plugin and theme.

    And I’ve done some changes.

    Autoptimize settings:
    -Optimize HTML Code?
    -Optimize JavaScript Code?
    -Also aggregate inline JS? —- Unchecked (Disabled)
    -Add try-catch wrapping?
    -Optimize CSS Code?
    -Save aggregated script/css as static files?

    Found that the list of excluded js files were messed up because of 2-3 comma’s “,” at wrong place. So, I fixed that.

    Then I did a load test and crawling with a simulated browser so that autoptimize will generate the necessary js and css files for each pages, as the site is woocommerce based site and has more than 8000 products.

    Now the cache size is in control. It’s 45Mb now.

    For critical CSS I’m following this – https://www.smashingmagazine.com/2015/08/understanding-critical-css/

    Plugin Author Frank Goossens

    (@futtta)

    Now the cache size is in control. It’s 45Mb now.

    great work guys! ??

    frank

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cache size is growing at faster rate (now 1.5GB)’ is closed to new replies.