WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 7 weeks ago

#32052 new enhancement

Add out of the box support for MO file caching — at Initial Version

Reported by: nicofuma Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2
Component: I18N Keywords: needs-patch
Focuses: performance Cc:

Description

While profiling WordPress with Blackfire we found that parsing an mo file is a heavy task, and it's done on each page.

Parsing of a .mo file

We propose to use the Object Cache API to not re-parse the file if it hasn't changed.
This way any non English installations with a plugin implementing the Object Cache API could benefit of a significant performance improvement.

You can see here a comparison showing the performance improvement:
comparison with the proposed patch

We found that a few plugins are doing the same thing but they are used very much and we think it could be great to have it mainstream.

Change History (3)

@nicofuma
4 years ago

proposal

@nicofuma
4 years ago

Parsing of a .mo file

@nicofuma
4 years ago

comparison with the proposed patch

Note: See TracTickets for help on using tickets.