Changes between Version 2 and Version 3 of Ticket #57459, comment 3
- Timestamp:
- 01/21/2023 12:09:08 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #57459, comment 3
v2 v3 19 19 > Is this feedback you've received from plugin authors? 20 20 21 No. I tried to make a plugin that uses it and didn't like the results. Ended up with a function that gets the file size (with `wp_filesize()`) when the meta is missing. Then tested the "savings" per image (all sub-sizes). Getting sizes with wp_filesize() when the image meta was already available was slower by 0.07ms. If the meta was not loaded, retrieving it was considerably slower. The chance that image file size could be missing made it pretty much impractical to retrieve the image meta.21 No. I tried to make a plugin that uses it and didn't like the results. Ended up with a function that gets the file size (with `wp_filesize()`) when the meta value is missing. Then tested the "savings" per image (all sub-sizes). Getting sizes with wp_filesize() when the image meta was already available was slower by 0.07ms. If the meta was not loaded, retrieving it was considerably slower. The chance that image file size could be missing made it pretty much impractical to retrieve the image meta. 22 22 23 23 Add to that the chance that the cached value in the meta may be wrong/outdated, and it seems not a good idea to use it.