I’ve been using Responsive Lightbox & Gallery (RL) on my sites for years. I recently updated WordPress and also updated my default theme from Twenty Seventeen (TS) to the latest Twenty Twenty-Four (TTF) theme. After extensive testing, this is what I’ve found.
My TTFB on post load is extremely slow. I turned off all plug-ins and narrowed it down to Responsive Lightbox & Gallery. The performance decrease is the same on both my Linux server in Google Cloud and my local development MacBook Pro. I don’t think it has anything to do with 6.4.2, as the plugin works fine with the TS theme. When I turn on TTF and turned on MySQL logging, I can see there are a number of queries called per image in TTF that are not called in TS.
For each image, there are a couple of calls like:
UPDATE wp_options
SET option_value
= ‘1705970123’ WHERE option_name
= ‘_transient_timeout_rl-attachment_ids_by_url’
The offending queries that I believe are slowing down the response to 20-40 seconds are like:
UPDATE wp_options
SET option_value
= ‘a:8520:{s:95: … ;i:62315;}’ WHERE option_name
= ‘_transient_rl-attachment_ids_by_url’
These queries seem to be setting this option for every image attachment in the database and are almost 1 million characters long.
Again, this is only happening with the TTF theme. I don’t know if it’s an issue with WordPress or RL, but I can’t use TTF until the issue is resolved.