• My site started to get VERY slow loading pages (4+ seconds per page) and I decided to run a PHP profiler on it to find out what was going on.

    After a lot of log digging I found that the PHP function in_array was being called tons of times and taking up over 50% of the load time of a page. When I looked at the call stack the origin was this plugin.

    Whilst it is VERY cool and great for smaller sites the performance hit you take on larger sites makes it unusable unless you have very aggressive caching enabled.

    Since I was only using it to exclude pages from the main header menu bar, I decided to take the HTML output generated and simply paste it as static code into the header.php so it is not generated every call.

    https://www.ads-software.com/extend/plugins/exclude-pages/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi coolbloke1324,
    I am interested in how and what you did with the html output.
    isn’t there a problem when updating WP to lose the code?
    which part html-code do I have to put in my header?

    exclude pages plugin takes 54% of al loading time here. So am over-interested in your solution.

    Thread Starter coolbloke1324

    (@coolbloke1324)

    Hi ya,

    I enabled the plugin, loaded the website, did View Source, then copied the specific section of the page where the menu bar was (inside a ul element) then turned off the plugin, edited my header.php file and pasted my static menu html overwriting the PHP-based menu output.

    This method only works well if you don’t alter your pages regularly. If you don’t then you can just add a new page manually into the header.php when you make a new page. This is the header.php file in your theme folder so changes are not lost when updating wordpress.

    If you do alter them a lot and would prefer to maintain the dynamic menu I would suggest you attempt to use a good caching system because loading the plugin just eats up processing time like anything!

    Thread Starter coolbloke1324

    (@coolbloke1324)

    P.S. if you are not familiar with editing wordpress themes, I’d read a few tutorials or make a copy of your current theme before altering it…

    thanks coolbloke
    thanks,
    I’m going to read into this matter before modifying the code.
    I do not much change to existing post and pages. but there will still be new pages and posts.
    What have you gain for speed?
    the loading of my site is now 957ms

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Exclude Pages] Very slow performance on large site (1,500 pages)’ is closed to new replies.