[wp-trac] [WordPress Trac] #57527: Duotone: PHP code quality improvements
WordPress Trac
noreply at wordpress.org
Wed Jan 25 21:41:15 UTC 2023
#57527: Duotone: PHP code quality improvements
----------------------------------------------+----------------------------
Reporter: Mamaduka | Owner:
| hellofromTonya
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 6.2
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: has-patch gutenberg-merge commit | Focuses: performance
----------------------------------------------+----------------------------
Comment (by hellofromTonya):
In [changeset:"55140" 55140]:
{{{
#!CommitTicketReference repository="" revision="55140"
Editor: Use in/decrementors in wp_tinycolor_hue_to_rgb().
Replaces `+=` and `-=` with `++$t` and `--$t` (in/decrementors) within the
`wp_tinycolor_hue_to_rgb()`.
Why? For performance: in/decrementors are more performant than an
assignment with a calculation.
References:
* https://www.php.net/manual/en/language.operators.increment.php
* https://github.com/WordPress/gutenberg/pull/44551
Follow-up to [50929].
Props jrf, czapla, antonvlasenko, aristath, mamaduka.
See #57527.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57527#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list