The function textimage_get_presets lacks static caching and gets called every time an image is included on a page. This patch also cleans up whitespace (mostly line endings and extra spaces... it is a byproduct of my IDE being set up to follow coding standards). The actual code changes are minor, however, and are limited to the textimage_get_presets function.

Comments

robertdouglass’s picture

StatusFileSize
new583 bytes

Here is a patch without the whitespace differences. As you can see the patch is quite simple and it corrects the flaw that you load the contents of the entire presets table every time you show an image (waste of resources). You'll have to fix the whitespace issues manually.

ajayg’s picture

This is a really important patch and wondering why it is not yet included in the later builds yet.

deciphered’s picture

Will be implemented in a future build.

deciphered’s picture

Version: 5.x-1.2 » 5.x-2.x-dev
Status: Needs review » Fixed

Implemented in latest Dev builds.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.