• Resolved Prometheus Fire

    (@prometheus-fire)


    Unfortunately, as much as I am enjoying this plugin. I recently found some performance issues with it.

    I’m not sure when I noticed it, but today after updating a number of plugins, I found that your was somehow causing a slowdown of almost a whole second to every page load.

    I’m not sure if/how you can recreate it and I’m okay with giving you access to my site so you can see what I mean, but it is a private site and we will need to communicate off-line in order to provide with credentials. Otherwise, I might be able to put together a screencast with it.

    I discovered the issue by doing the typical plugin troubleshooting dance of deactiving all my plugins and seeing where the issue was.

    https://www.ads-software.com/plugins/buddypress-first-letter-avatar/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author DanielAGW

    (@danielagw)

    Hi,
    Performance issues are understandable. Before post loads, PHP has to check whether user has Gravatar assigned to his e-mail. It all happens before page is loaded. The loading time will be longer on pages with many comments. On pages without comments (such as main page) the load time should not be longer.

    If you turn off Gravatars, the load time should be shorter. If you go to WP First Letter Avatar settings and uncheck Use Gravatar option, you should notice that load time is shorter. Please see if it works for you, just to be sure this is the reason.

    I can’t think of any solution to fix this issue while still having Gravatars as default option. It would be possible to make it work asynchronously, but only through JavaScript. So in PHP layer of the plugin, everyone would have a letter avatar assigned, and after page loads, some avatars would be replaced by Gravatar (if user has it assigned). The downside is that JavaScript is required in order to make it work.

    Thread Starter Prometheus Fire

    (@prometheus-fire)

    Ah! This is excellent feedback and actually explains everything. I had originally disabled Gravatars in the settings you mentioned, but one of my users had asked about it so I turned it back on – hence the slowdown that started when I previously didn’t have one. Your detailed response is helpful, thank you!

    Plugin Author DanielAGW

    (@danielagw)

    I’m glad you find my answer satisfying. I’ll consider adding alternative JavaScript solution in future releases, so that users will be able to choose whether they want faster, but JS-based solution or slower but PHP-only solution for Gravatars.

    Plugin Author DanielAGW

    (@danielagw)

    Asynchronous JavaScript-based solution for loading Gravatars has just been added as an option in 1.0.2 release (and also in 1.2.6 release of WP First Letter Avatar). Now you can have the page load very quickly and then check for Gravatars by using jQuery and replace applicable avatars with Gravatars.

    Thanks for bringing this issue up – it motivated me to finally implement this handy feature ??

    I upgraded today and checked “Use JavaScript for Gravatars” but now Gravatars don’t show.

    Plugin Author DanielAGW

    (@danielagw)

    Have you also checked “Use Gravatar”? These two options need to be checked. Gravatars will be loaded with noticable delay – first all users are assigned a custom avatar based on their username, then after page loads JavaScript checks all of the avatars to see whether user has Gravatar assigned to his e-mail and replaces applicable custom avatar with Gravatar. If there are many avatars on page, it may take even 5 seconds to have them loaded, because every single avatar needs to be checked.

    If you are certain that some user should have Gravatar displayed, but it doesn’t show up even after couple of seconds, please use Chrome or Firefox Inspect element feature on the avatar (<img ... /> tag) to see if it has data-bpfla-gravatar attribute assigned to it. If the attribute is there, it means that:
    a) The .js file is not added correctly to your blog
    b) There is a problem/conflict with jQuery on your site
    If you give me link to your blog, I can do some basic verification with Chrome or Firefox inspector to see where the problem lies.

    Plugin Author DanielAGW

    (@danielagw)

    P.S. If you don’t want to publicly post your blog address, you can e-mail it to me: danielagw.wp AT outlook DOT com

    Hi Daniel,
    I emailed the site address and login info.

    Plugin Author DanielAGW

    (@danielagw)

    Jeffrey has contacted me and we managed to find root of this problem. New plugin version will be posted before the weekend.

    Very nice plugin indeed. Unfortunately I had to deactivate it due to performance issues.

    I tried all options (included javascript) but a members profiles used to be loading withing 1 second now takes 2.5 and sometimes more than 4.

    Identified by observing (page generated in xxx seconds) on my footer.

    I hope next releases will address those issues.

    Plugin Author DanielAGW

    (@danielagw)

    Hello,
    With JavaScript option enabled, plugin should not cause any performance issues. If there are any, they should not be longer than 0,1 seconds. Do you have a cache plugin activated? I received one report from a user who says that having cache plugin activated (W3TC to be specific) caused noticable performance issues with my plugin.

    Yes, I user WP super cache. But I can not afford to deactivated. I hope you might be able to come up with a solution, as your plugin is a real added value component for BP.

    We use Google Pagespeed Modul with the following config for dedicated Virtual Host and the performance for Buddypress will grow!! The Lazy Load Modul for WordPress combined with the Pagespeed Config works perfekt. Especially the activity stream (News Feed) is very fast.

    VIRTUALHOST:
    ===========

    <IfModule mod_deflate.c>
    <IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
    SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
    RequestHeader append Accept-Encoding “gzip,deflate” env=HAVE_Accept-Encoding
    </IfModule>
    </IfModule>
    <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE application/atom+xml \
    application/javascript \
    application/json \
    application/ld+json \
    application/rss+xml \
    application/vnd.ms-fontobject \
    application/x-font-ttf \
    application/x-web-app-manifest+json \
    application/xhtml+xml \
    application/xml \
    font/opentype \
    image/svg+xml \
    image/x-icon \
    text/css \
    text/html \
    text/plain \
    text/x-component \
    text/xml
    </IfModule>
    </IfModule>

    <IfModule pagespeed_module>
    ModPagespeed on
    AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
    ModPagespeedFileCachePath “/var/cache/mod_pagespeed/”
    ModPagespeedFileCacheInodeLimit 500000
    ModPagespeedAvoidRenamingIntrospectiveJavascript on
    ModPagespeedLibrary 105527 ltVVzzYxo0 //ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js
    ModPagespeedLibrary 92501 J8KF47pYOq //ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js
    ModPagespeedLibrary 141547 GKjMUuF4PK //ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js
    ModPagespeedLibrary 43 1o978_K0_L https://www.modpagespeed.com/rewrite_javascript.js
    ModPagespeedDisableFilters extend_cache
    ModPagespeedDisableFilters rewrite_css
    ModPagespeedEnableFilters collapse_whitespace,elide_attributes,remove_comments
    ModPagespeedEnableFilters insert_img_dimensions,rewrite_images,inline_images,recompress_images
    ModPagespeedDisableFilters combine_css
    ModPagespeedModifyCachingHeaders off
    ModPagespeedDisableFilters rewrite_javascript,rewrite_css,combine_css,combine_javascript
    ModPagespeedDisableFilters defer_javascript
    <Location /mod_pagespeed_beacon>
    SetHandler mod_pagespeed_beacon
    </Location>
    <Location /mod_pagespeed_statistics>
    Order allow,deny
    Allow from localhost
    Allow from 127.0.0.1
    SetHandler mod_pagespeed_statistics
    </Location>
    <Location /mod_pagespeed_console>
    Order allow,deny
    Allow from localhost
    Allow from 127.0.0.1
    SetHandler mod_pagespeed_console
    </Location>
    <Location /mod_pagespeed_message>
    Allow from localhost
    Allow from 127.0.0.1
    SetHandler mod_pagespeed_message
    </Location>
    <Location /mod_pagespeed_referer_statistics>
    Allow from localhost
    Allow from 127.0.0.1
    SetHandler mod_pagespeed_referer_statistics
    </Location>
    </IfModule>

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Performance Issues’ is closed to new replies.