Make WordPress Core

Opened 3 months ago

Closed 7 weeks ago

#60304 closed enhancement (wontfix)

Improve performance of unpack PHP function (parsing binary data)

Reported by: dryabov's profile dryabov Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.5
Component: General Keywords: has-patch
Focuses: performance Cc:


It's possible to speed up unpack performance by using offset argument instead of substr (available since PHP 7.1).

Attachments (1)

60304-unpack-improve.diff (6.5 KB) - added by dryabov 3 months ago.
Patch diff

Download all attachments as: .zip

Change History (5)

3 months ago

Patch diff

#2 @swissspidy
3 months ago

  • Keywords has-patch added

Hi there and welcome to WordPress Trac. Thanks for submitting this ticket & corresponding PR.

Right now WordPress requires PHP 7.0 or higher, so this change is not possible at the moment.

Since you mention performance, have you done any benchmarks to see whether there is actual measurable impact? None of these look like hot code paths, so I doubt there is a substantial difference.

This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.

7 weeks ago

#4 @swissspidy
7 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Closing given the PHP version requirement and this not affecting a hot code path.

Note: See TracTickets for help on using tickets.