Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#24620 closed defect (bug) (fixed)

Upgrade process loads entire contents of options table unnecessarily

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

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 11 years ago.
Patch
24620-2.diff (691 bytes) - added by leewillis77 11 years ago.
Updated patch

Download all attachments as: .zip

Change History (10)

@leewillis77
11 years ago

Patch

#1 @SergeyBiryukov
11 years ago

  • Component changed from General to Upgrade/Install

Related: #20316

#2 @nacin
11 years ago

  • Milestone changed from Awaiting Review to 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
11 years ago

Updated patch

#3 @leewillis77
11 years ago

  • Keywords has-patch added

Updated to remove prepare-ing.

#4 @SergeyBiryukov
11 years ago

#24641 was marked as a duplicate.

#5 @aaroncampbell
11 years ago

  • Keywords commit added

24620-2.diff worked for me.

#6 follow-up: @nacin
11 years ago

This misses $fat_options.

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

Replying to nacin:

This misses $fat_options.

Those all exist in $options

#8 @nacin
11 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to 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.