[wp-trac] [WordPress Trac] #63481: WP_Image_Editor_Imagick takes longer time to upload image

WordPress Trac noreply at wordpress.org
Wed May 28 13:52:35 UTC 2025


#63481: WP_Image_Editor_Imagick takes longer time to upload image
-----------------------------+------------------------------
 Reporter:  alimuzzamanalim  |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Media            |     Version:
 Severity:  major            |  Resolution:
 Keywords:  close            |     Focuses:  performance
-----------------------------+------------------------------
Changes (by SirLouen):

 * keywords:  needs-patch 2nd-opinion => close


Comment:

 I've been reviewing the Imagick's source code  for `getImageColors` and
 it's an n^2^ complexity. The algorithm basically has to check every single
 pixel in the image to determine the number of colors, and it's a
 trustworthy operation, meaning they have not applied any sampling
 optimizations.

 Currently, we could say that this report has been fixed because in [60246]
 we don't use this function any more. For this reason, I will say that we
 should bring this conversation back to where we are discussing the future
 of compression #63448, taking this observations by @siliconforks as new
 context and close this as `worksforme` (fixed, in the current `trunk`), to
 avoid having the conversation context divided between two threads.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63481#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list