• net

    (@krstarica)


    I find this plugin very interesting, but had to disable it because it slows down the website.

    For every single page I visit the first time, it creates separate cache files and this process is very slow. Other similar plugins do it once and then reuse the same cache file.

    There’s gotta be some way to avoid reprocessing everything. For example, all queued js/css could be merged into a single cache file and all inline stuff should be just moved to footer and executed after cache file is loaded.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Frank Goossens

    (@futtta)

    reprocessing everything occurs when aggregated JS (or CSS) is different from the one in cache. aggregated JS (or CSS) it typically different when you’re also aggregating inline JS (or CSS) if that contains variable … variables ??

    so don’t aggregate inline JS (or CSS, but that’s less of a problem in general) and you should see a lot more re-use and a lot less slowdown (which is due to the minification-step).

    hope this clarifies,
    frank

    Thread Starter net

    (@krstarica)

    Without aggregated inline CSS/JS it’s much better, many thanks! I think you should add this explanation somewhere on plugin settings page.

    Now we are getting errors “jQuery is not defined” and similar. Maybe there should be another option when not using aggregated JS, which wraps inline JS with some code to force its execution after deferred JS is being loaded.

    Plugin Author Frank Goossens

    (@futtta)

    I think you should add this explanation somewhere on plugin settings page.

    too much info already, that’s why I link to the FAQ ??

    Now we are getting errors “jQuery is not defined”

    try excluding jquery (default; js/jquery/jquery.js) from JS optimization?

    frank

    Thread Starter net

    (@krstarica)

    If jquery.js is excluded, then it blocks rendering, that’s why I proposed wrapping inline JS code.

    Plugin Author Frank Goossens

    (@futtta)

    If jquery.js is excluded, then it blocks rendering

    it is, i’m afraid.

    that’s why I proposed wrapping inline JS code.

    that could work, but it could also break things. not a big fan of that possibility ??

    Thread Starter net

    (@krstarica)

    I’m not a fan of this, too, but wondering what to do with such inline JS code now.

    Obviously theme creators didn’t care much about this issue. If we start changing such JS code manually everywhere, that would create a mess for future upgrades.

    So the idea is to make this feature optional – if somebody (like us ?? wants to wrap all inline JS code.

    Plugin Author Frank Goossens

    (@futtta)

    well, if you want to contribute such a solution (tucked away behind a filter for starters, false by default), you’re more then welcome to fork on GitHub and do a pull request when ready ??

    Thread Starter net

    (@krstarica)

    Every time any page is updated on website, it deletes all cache from /wp-content/cache/autoptimize directory. Is there a way to avoid this?

    Plugin Author Frank Goossens

    (@futtta)

    well, the question is what is deleting all cache from /wp-content/cache/autoptimize … AO never deletes cache and wordpress core doesn’t either. guess you’ll have to audit your plugins @krstarica ??

    Thread Starter net

    (@krstarica)

    Found the cause.

    Using WP Super Cache plugin and having “Clear all cache files when a post or page is published or updated” option enabled.

    On update it deletes the whole directory “/wp-content/cache”.

    Any workaround?

    Plugin Author Frank Goossens

    (@futtta)

    Any workaround?

    well, you could change the place AO stores the cache to be outside of /wp-content/cache, cfr. info in the FAQ?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Slowing down the website’ is closed to new replies.