Make WordPress Core


Ignore:
Timestamp:
10/07/2024 05:11:43 PM (3 months ago)
Author:
joemcgill
Message:

Media: Cache the results of _wp_image_editor_choose.

This saves the WP_Image_Editor implementation that supports the queried options to a cache to avoid performing redundant compatibility checks, which can be expensive. For example, WP_Image_Editor_Imagick::supports_mime_type() can get called in the editor multiple times to determine which image formats can be supported during wp_plupload_default_settings().

With this cache, the support will be stored for 1 day, speeding up loading times for the editor. This also introduces a new global caching group, image_editor to manage any subsequent caches that are related to image editor optimizations.

Props joemcgill, desrosj, westonruter, flixos90, adamsilverstein, mukesh27, joehoyle.
Fixes #61532.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/load.php

    r59171 r59189  
    877877                'blog_meta',
    878878                'global-posts',
     879                'image_editor',
    879880                'networks',
    880881                'network-queries',
Note: See TracChangeset for help on using the changeset viewer.