• Hi,

    After switching over from Fly Dynamic we’ve recently encountered significant performance issues with the Better Image Sizes plugin, which has begun generating an excessive number of calls. In some instances, these calls have exceeded 400,000, leading to substantial spikes in our memory usage. This has severely impacted the overall performance and stability of our sites using the plugin.

    Upon investigation, we identified that this problem arises specifically when we use the pre-existing function fly_get_attachment_image() which then calls bis_get_attachment_image_attributes filter.

    Are you able to look into this or provide some help in stopping this from occurring.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author kubiq

    (@kubiq)

    Hello,

    it’s just a normal PHP function that is called on every page render – like any other PHP function.

    Yes, fallback fly_get_attachment_image will call bis_get_attachment_image, that’s the point of backward compatibility, but that is just 1:1 call…

    If you had 400.000 calls, then you were probably under the DDOS attack, or something else happened, but plugin itself will not create any infinite loop or recursive calls.

    We’ve also come across this same issue – switching from Fly Dynamic Image Resizer to Better Image Sizes saw the memory usage on our server spike massively.

    On further investigation we did also notice an enormous number of calls to bis_get_attachment_image_attributes() in the hundreds of thousands. This wasn’t proportional to the amount of traffic on the site.

    We waited a few days in case this was down to image generation occuring for all our images again, however the memory utilisation was consistently high until we eventually disabled the plugin and everything returned to normal.

    Plugin Author kubiq

    (@kubiq)

    There is no function called bis_get_attachment_image_attributes , it is only filter hook that is called once inside the get_attachment_image function and filter itself should have no impact on performance if you don’t hook too many things on it.

    I’m also using this plugin on tens of different websites and I’m also optimizing speed and I don’t have this problem… can you provide some more data? I don’t even know what kind of data it should be… maybe some log of URLs, triggers and some resources consumption or time executions or anything that can help me to understand what’s going on?

    Or if you can replicate this on some sandbox where I can actually access and play with it… or tell me steps how I can replicate this issue, because I would love to help you, but I’ve never experienced this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.