• Resolved Henk Barreveld

    (@henk-barreveld)


    Dear WP-Optimize team,

    In a reply by Marc Lacroix on an earlier support item, about a year ago, I found the text:

    The preloading uses a good amount of resources because it visits all pages in a short amount of pages. But WP-Optimize will slow the process down to process less posts at a time, so performance should still be good.

    That’s interesting! Is there a nice way to influence that process programmatically, for example using a WP filter hook? I see that WP-Optimize preloads about 400 posts/pages in about 10 minutes, but I would not mind extending that to -say- 30 minutes and reduce the average cpu and IO-load during the preloading.

    Best regards,
    Henk

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Henk,

    There are several parameters you can play with:
    – Using add_filter('wpoptimize_preload_delay', 'my_preload_delay_method'), you can override the delay between two pages, which is currently set at 500000 (1/2 a second).

    – Using add_filter('wpo_page_cache_preload_memory_threshold', 10485760);
    That filter lets you change how much memory should be left before interrupting the preload queue (10MB by default).

    – Using add_filter(‘wpo_page_cache_preload_continue_interval’, 600);
    This filter enables to change the time before the preload resumes when interrupted (600s by Default).

    Best,
    Marc

    Thread Starter Henk Barreveld

    (@henk-barreveld)

    Thank you, Marc!

    The setting of the delay between URLs seemed to me to have the most direct influence, so I experimented a little and settled on a setting of 2 seconds (2,000,000 microseconds :-)). Preload is now done in about 20 minutes and the server load is fine.

    By the way, because I am using the preload schedule “same as cache lifespan”, I also had to change the default value for the allowed time difference in the preloader function run_scheduled_cache_preload(), using the filter wpo_preload_allowed_time_difference.

    Thanks again for your help!

    Best regards,
    Henk

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Preload throttling’ is closed to new replies.