• Resolved djvdorp

    (@djvdorp)


    Hello,

    I was wondering if there is an explicit way of disabling the automatic Autoptimize CriticalCSS Queue? This might make sense on a large site, where it makes more sense to (only) manually add a strict ruleset, as the queue will get very large on a large site very quickly, overloading the server rather fast.

    I also noticed that there seem to be no settings related to tweaking how many and how often the CriticalCSS.com queueing is running, if I am not mistaken?

    • This topic was modified 3 years, 1 month ago by djvdorp.
    • This topic was modified 3 years, 1 month ago by djvdorp.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    There is no explicit way to disable the job queue no, but that should not be needed even on large sites really, as:

    * if for a given page a manual rule was found, there will be no job created
    * the job queue will automatically be purged of older jobs if it gets too big (by virtue of a scheduled job, twice a day)
    * the job queue size has no impact on server load (except if it gets ridiculously big and it cannot be saved in the db any more (it’s stored in a WordPress option)
    * server load could theoretically be impacted by queue processing, but the scheduled job for this runs once every 10 minutes (can be set to a different value with the AO_CCSS_DEBUG_INTERVAL constant) and will only POST 2 requests to criticalcss.com per run and (if any ongoing job) execute 2 GET requets (to fetch generated CCSS)

    So assuming you have a good manual ruleset (covering most/ all conditional tags) then the amount of new jobs should be pretty limited. The only exception are pages (in WordPress speak, as opposed to blog posts) because by default each on of those gets it’s own rule. If that is the case you can disable the “Force path-based rules to be generated for pages?” option in Settings -> Autoptimize -> Critical CSS -> Advanced settings.

    hope this helps,
    frank

    Thread Starter djvdorp

    (@djvdorp)

    Thanks again frank! Also for already providing the exception regarding WP Pages.

    How would one go with custom post types and other types of custom pages that are not filterable via conditional tags though, as our site is rather complex here?

    I suspect that we would need something like path/rule-based matching for that, which does not require conditional tags, but just path-based filtering with wildcards? If that is possible we could come up with a good manual ruleset ??

    • This reply was modified 3 years ago by djvdorp.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, although they are technically not “conditional tags”, public CPT’s (and templates) should also appear in the “condtional tag” dropdown? ??

    Thread Starter djvdorp

    (@djvdorp)

    @optimizingmatters sorry for the delayed reply, but you seem right again!
    The only reasonable explanation for the server load would be a ridiculously big wp_option entry for the autoptimize_ccss_queue WP option and improper caching or the HTTP requests directed towards CriticalCSS taking too long and/or timing out.

    However, if I am not mistaken, creating a good manual ruleset (covering most/ all conditional tags) would mean that I have to manually add the critical CSS in these cases, which wouldn’t really be ideal? At least, the field seems to say so:

    > Custom Critical CSS:
    > For path based rules, paste your specific and minified critical CSS. If you want to create a rule to exclude from critical CSS injection, enter “none”

    What I was expecting to find in terms of functionality was something that would allow us to come up with a good manual ruleset, that would then automatically generate the critical CSS for it using the criticalcss.com service (but only once per match, in strong contrast to how the automatic queueing would create N different lines in the queue for N times that the same page template was used). Thus allowing us to benefit of the best of both worlds, without manual work ??

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    What I was expecting to find in terms of functionality was something that would allow us to come up with a good manual ruleset, that would then automatically generate the critical CSS for it using the criticalcss.com service (but only once per match, in strong contrast to how the automatic queueing would create N different lines in the queue for N times that the same page template was used). Thus allowing us to benefit of the best of both worlds, without manual work ??

    officially this is not possible, but here’s the but; after rules have automatically generated and you’re happy with them, click on “edit” and make a tiny change and save the rule. this will change the rule from “auto” to “manual”, stopping furher updates ??

    Thread Starter djvdorp

    (@djvdorp)

    officially this is not possible, but here’s the but; after rules have automatically generated and you’re happy with them, click on “edit” and make a tiny change and save the rule. this will change the rule from “auto” to “manual”, stopping further updates ??

    That’s some cool hidden functionality! Then it would be a matter of generating one proper example of all types of content we have and applying the above trick! That would have to be done via auto-queueing then though I would suspect?

    • This reply was modified 3 years ago by djvdorp.
    • This reply was modified 3 years ago by djvdorp.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    That would have to be done via auto-queueing then though I would suspect?

    indeed, you let the rules auto-generate and once generated you make them manual ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to disable the automatic Autoptimize CriticalCSS Queue?’ is closed to new replies.