Make WordPress Core


Ignore:
Timestamp:
10/07/2024 05:11:43 PM (14 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/ms-blogs.php

    r57898 r59189  
    555555                        'blog_meta',
    556556                        'global-posts',
     557                        'image_editor',
    557558                        'networks',
    558559                        'network-queries',
     
    649650                        'blog_meta',
    650651                        'global-posts',
     652                        'image_editor',
    651653                        'networks',
    652654                        'network-queries',
Note: See TracChangeset for help on using the changeset viewer.