• Resolved ljkeashly

    (@ljkeashly)


    Hi,

    We have Ewww 2.9.3 and Flatfolio V1.0. We have Flatfolio on our home page and on another page. When Ewww is enabled these pages take over a minutes to load. When Ewww is disabled the pages start to load in a second or two.

    Our understanding was that Ewww optimized images when you ran the Optimization tool & uploaded images, not that it was running every time there is an image displayed on the frontend of the site. Is there a setting that can display image optimization on frontend load? That is images would only be optimized when you upload them in the Media Manager or you run the Image Optimization tool.

    Thank you.

    https://www.ads-software.com/plugins/ewww-image-optimizer/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    EWWW normally only runs in the manner that you described. However, some plugins/themes will generate images dynamically on the front-end using the WP_Image_Editor class (which is normal). With parallel optimization enabled, there should be no slow-down, but that is not feasible on all sites.

    The other possibility is that you are using the Alt Webp Rewriting and have hit a glitch with the xml parsing functions.

    If you’re not using the WebP option, then I recommend you turn on EWWW’s debugging setting and load a few pages (load each one several times). Then on the back-end, go to Media->Dynamic Image Debugging and see what shows up. I would expect to see several images listed there, with multiple re-optimizations. Post a couple of those via pastebin.com (unless you can decipher them yourself), and then we’ll know who needs to fix what (hopefully).

    Thread Starter ljkeashly

    (@ljkeashly)

    Hi,

    Thank you for your help with this issue. I turned off parallel optimization, but it didn’t make any difference. Alternative WebP Rewriting is not ticked, so we shouldn’t be using it.

    When I have debug turned on, then the problem goes away, the home page loads quickly like it should.

    Here is the debugging info: https://pastebin.com/UTSNhgh2

    These are all Flatfolio images that are showing up.

    Thank you again.

    Plugin Author nosilver4u

    (@nosilver4u)

    Yeah, flatfolio is regenerating images like crazy, that’s causing your load issues. Report a bug with them, and reference that pastebin you posted, as it will show them where the images are being generated. They should be caching any images they generate to disk, and then checking to see if the image exists before generating a new one.

    However, EWWW shouldn’t make the page load slower with debug turned off, but here’s my suspicion on why it is:
    Enabling debug mode turns off background optimization, which uses asynchronous requests. Those background requests can be stalled if a plugin is using sessions improperly (WP core doesn’t use them at all), as it will “lock” the session in the background bringing all processing to a crawl until all of those background requests timeout.

    So we’ll leave the flatfolio issue to their devs to cleanup, but here’s what we need to do:
    Can you search through your entire WP site codebase for any instances of the session_start() function and let me know if you find any?
    If you have command line access, you can use rgrep (or ‘grep -r’), otherwise see if you can find a way to recursively search through all the files for that command. Your webhost might be able to run a quick search for you also.

    Plugin Author nosilver4u

    (@nosilver4u)

    Try this fix and turn off debugging to see if it fixes the delays a bit: https://downloads.www.ads-software.com/plugin/ewww-image-optimizer.zip

    Please do let me know, because I don’t want to push that ‘fix’ out if it doesn’t improve things at all.

    Thread Starter ljkeashly

    (@ljkeashly)

    Hi,

    Thank you for your help. I tried the new version, but it didn’t help. With Ewww disabled the home page loaded in less than a second. With Ewww 2.9.3.3. enabled it took over 15 seconds to load.

    We are just going to leave Ewww disabled for now.

    Thank you again for all your help on this.

    Plugin Author nosilver4u

    (@nosilver4u)

    Ok, that at least rules one thing out, thanks for checking. If you can post a list of your plugins, I can check them (at least the free ones) to see if they are using session_start improperly.

    Thread Starter ljkeashly

    (@ljkeashly)

    Hi,

    Here is a list of our Active plugins:
    Advanced Custom Fields
    Akismet
    Better WordPress Minify
    Contact Form DB
    Enhanced Text Widget
    Exclude Pages from Navigation
    Fast Secure Contact Form
    FlatFolio
    GC Testimonials
    Google Analytics by MonsterInsights
    Include HTML and PHP
    jQuery Colorbox
    ManageWP – Worker
    mobble
    myStickymenu
    Nextend Smart Slider 3 Pro
    Page Links To
    Post Snippets
    Post Type Switcher
    Post Types Order
    Random Text
    Revision Control
    Shield
    Simple History
    Simple Page Ordering
    StripTease
    Superfly Menu
    Toolset Types
    Widget Context
    Wordfence Security
    WP Masonry Layout Pro
    WP No Category Base
    Yoast SEO

    Hope that helps.

    Plugin Author nosilver4u

    (@nosilver4u)

    hmm, been unable to replicate it so far, tried all the likely suspects, can you contact me here: https://ewww.io/contact-us/

    I’m having the same issue, though with a different theme; enabling debug mode took care of the slow loading problem.

    Plugins using session_start():

    • Broken Link Checker
    • Product Customer List for WooCommerce
    • WP Affiliate Platform
    • WPMU Dev Maps

    Is there any downside to leaving maintenance mode on?

    [moderator note: Please don’t post duplicates… deleting them now.]

    Plugin Author nosilver4u

    (@nosilver4u)

    The main downside is that it creates a debug log that will keep on growing, plus if you’re having this problem in the first place, it means something on your site is generating images excessively. With debug mode on, every one of those is going to start storing large trace-logs in the database. Short term, not too bad. Long term, could get ugly.

    So next thing to do is find the culprit to the image regeneration. Once you’ve had debug on for a half hour or so, check under Media->Dynamic Image Debugging to see what you have for trace logs, and post a couple via pastebin.com

    Here’s part of the log: https://pastebin.com/RkQ7vScR

    Looks like it might be part of the theme?

    (Sorry if you got a bunch of duplicates earlier…apparently I had too many links and it was flagged for moderation, but looked like it didn’t post at all.)

    Plugin Author nosilver4u

    (@nosilver4u)

    Wowzers, yeah it’s part of your theme. Send your theme developers that information and ask them to fix their image regeneration bug.

    Plugin Author nosilver4u

    (@nosilver4u)

    @ljkeashly, I think we lost track of it when andrew hijacked the thread. I believe I was waiting for you to contact me directly via https://ewww.io/contact-us/

    Thread Starter ljkeashly

    (@ljkeashly)

    Hi,

    We have determined that Flatfolio is the issue and can deactivate Ewww on this site using it, so we are all good.

    Thank you so much for all your help.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Ewww running when loading frontend pages?’ is closed to new replies.