Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#24620 closed defect (bug) (fixed)

Upgrade process loads entire contents of options table unnecessarily

Reported by: leewillis77 Owned by: nacin
Priority: normal Milestone: 3.6
Component: Upgrade/Install Version: 3.6
Severity: normal Keywords: has-patch commit
Cc: Focuses:

Description

The current upgrade process loads the option_names from the entire options table unnecessarily. Attached patch resolves it.

Attachments (2)

24620.diff​ (803 bytes ) - added by leewillis77 13 years ago.
Patch
24620-2.diff​ (691 bytes ) - added by leewillis77 13 years ago.
Updated patch

Download all attachments as: .zip

Change History (10)

#1 @SergeyBiryukov
13 years ago

  • Component General → Upgrade/Install

Related: #20316

#2 @nacin
13 years ago

  • Milestone Awaiting Review → 3.6

Rather than the prepare we can simply '''implode( "', '", $keys ) for these — as they are static strings we control.

I'm fine with this fix.

@leewillis77
13 years ago

Updated patch

#3 @leewillis77
13 years ago

  • Keywords has-patch added

Updated to remove prepare-ing.

#4 @SergeyBiryukov
13 years ago

#24641 was marked as a duplicate.

#5 @aaroncampbell
13 years ago

  • Keywords commit added

24620-2.diff​ worked for me.

#6 follow-up: @nacin
13 years ago

This misses $fat_options.

#7 in reply to: ↑ 6 @aaroncampbell
13 years ago

Replying to nacin:

This misses $fat_options.

Those all exist in $options

#8 @nacin
13 years ago

  • Owner set to nacin
  • Resolution → fixed
  • Status new → closed

In 24614:

In populate_options(), only query the option names we are checking against. No need to load the entire table into memory. props leewillis77. fixes #24620.

Note: See TracTickets for help on using tickets.