Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#56639 closed defect (bug) (fixed)

Avoid excessive `notoptions` lookups

Reported by: tillkruess Owned by: SergeyBiryukov
Priority: normal Milestone: 6.1
Component: Cache API Version: 6.1
Severity: normal Keywords: has-patch add-to-field-guide
Cc: Focuses: performance

Description

When the notoptions key does not exist in a persistent object cache, it's requested hundreds of times until the first not-option is written.

Change History (8)

This ticket was mentioned in ​PR #3315 on ​WordPress/wordpress-develop by ​tillkruss.


4 years ago
#1

  • Keywords has-patch added

When the notoptions key does not exist in a persistent object cache, it's requested hundreds of times until the first not-option is written.

Trac ticket: https://core.trac.wordpress.org/ticket/56639

#2 @tillkruess
4 years ago

  • Focuses performance added
  • Version → trunk

This could go into 6.0.3 IMO.

#3 @SergeyBiryukov
4 years ago

  • Milestone Awaiting Review → 6.1

#4 @spacedmonkey
4 years ago

This change seems good to me. Would @SergeyBiryukov @dd32 be willing to commit?

#5 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Status new → reviewing

#6 @SergeyBiryukov
4 years ago

  • Resolution → fixed
  • Status reviewing → closed

In 54345:

Options, Meta APIs: Prevent excessive notoptions key lookups.

When the notoptions key does not exist in a persistent object cache, it was requested hundreds of times until the first not-option is written.

This commit improves performance by setting the value to an empty array to prevent non-existent notoptions key from triggering multiple key lookups.

Follow-up to [4855], [14515].

Props tillkruess, dd32, spacedmonkey.
Fixes #56639.

​SergeyBiryukov commented on ​PR #3315:


4 years ago
#7

Thanks for the PR! Merged in r54345.

#8 @milana_cap
4 years ago

  • Keywords add-to-field-guide added
Note: See TracTickets for help on using tickets.