WordPress.org

Ready to get started?Download WordPress

Forums

WP Photo Album Plus
[resolved] How to prevent loading WPPA ressources on all the pages ? (8 posts)

  1. julie92500
    Member
    Posted 1 year ago #

    Dear,

    How can i prevent WPPA ressources (js and css) to be loaded in most of the pages / posts of the site but only on the ones which are using the functionnality ?

    Thanks.

    http://wordpress.org/extend/plugins/wp-photo-album-plus/

  2. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    My opinion about this is as follows:

    The css and js files are in total approx 60 kb, and that is less than an average photo on a typical site running wppa+.

    If 60 kb is a problem for you, you should have no fullsize photos on your site anyway.

    The chance is big that you have a wppa+ widget active.

    The files are cached in the browser so the load is only once until a delete temp internet files happens.

  3. julie92500
    Member
    Posted 1 year ago #

    The issue is not the css and js files size but the time to build the page (more than 500+ additional get object requests) then download it / interpret it by the client browser.

    This is a concern for pages and posts without gallery; to have a time penalty (on both server and client side) on more than 3.000 pages for only two of them with gallery.

  4. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    How can i prevent WPPA ressources (js and css)

    This was your question though?

    more than 500+ additional get object requests

    please supply more info / evidence of this

  5. julie92500
    Member
    Posted 1 year ago #

    My question was badly exposed (i'm not fluent in english, sorry). My concern is to have this pluging using no ressource on any page or post without gallery.

    As i'm using APC object caching, i have a way to dump number of cache access during page construction in the page's footer :

    global $wp_object_cache;
    foreach ( $wp_object_cache->stats as $stat => $n ) {
       echo "$stat: $n ";
    }

    On my web site, with your pluging running i got these :

    Cache get: 4737 delete: 1 add: 1

    and around 670 ms to build the page

    With your plugin deactivated i got these :

    Cache get: 3962 delete: 0 add: 0

    and around 600 ms to build the page

    => 775 more get object with your plugin running and 10% more time. NB: I have a total of 45 plugins, only this one is consuming so many get (16% of all the gets)

  6. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    wppa+ is a large / extensive / heavy plugin with a myriad of possibilities. If 70 ms is a problem and you use only a few images try an other.

  7. julie92500
    Member
    Posted 1 year ago #

    thanks for your help.

    i've followed your recommendation with success.

  8. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    I have digged into this and i can promise you a substantial performance improvement during initialisation in version 4.9.0

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.