WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 6 weeks ago

#32052 new enhancement

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

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

Description (last modified by SergeyBiryukov)

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 not used very much and we think it could be great to have it mainstream.

Change History (7)

@nicofuma
4 years ago

proposal

@nicofuma
4 years ago

Parsing of a .mo file

@nicofuma
4 years ago

comparison with the proposed patch

#2 @nicofuma
4 years ago

I just noticed a small typo in the description, I forgot a 'not' in the last sentence:

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

#3 @SergeyBiryukov
4 years ago

  • Description modified (diff)

@nicofuma
4 years ago

Updated patch to avoid any notice

Note: See TracTickets for help on using tickets.