Make WordPress Core

Opened 4 years ago

Last modified 8 weeks ago

#54479 reviewing enhancement

Set_blog_id performance

Reported by: wladwm's profile wladwm Owned by: flixos90's profile flixos90
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch needs-test-info changes-requested
Focuses: multisite, performance Cc:

Description

On multisite many plugins switches blog (wbdb->set_blog_id) many times (few thousands).
There is a performance impact in wpdb->tables method.
Simple caching reduces overall execution time.

Change History (11)

This ticket was mentioned in PR #1925 on WordPress/wordpress-develop by wladwm.


4 years ago
#1

  • Keywords has-patch added

https://core.trac.wordpress.org/ticket/54479#ticket

Add tables names caching for multisite in wpdb->set_blog_id to improved performance with blogs switching.

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

#2 @johnbillion
4 years ago

  • Keywords reporter-feedback added

Thanks for the PR @wladwm! And welcome.

Could you share some before and after performance numbers please? Would be good to see what impact this has.

Cheers

Last edited 4 years ago by johnbillion (previous) (diff)

#3 @wladwm
4 years ago

Hi johnbillion.

On some pages delay for example was reduced from 5.92sec to 5.17sec.
But with some plugin I even cant open some pages w/o patch - cloudfare timeout occurs.
I did some debugging yesterday when discovered this issue with massive blog switching:
https://ibb.co/B6pd1W4

#4 @flixos90
6 months ago

  • Keywords reporter-feedback removed
  • Milestone changed from Awaiting Review to 6.9
  • Owner set to flixos90
  • Status changed from new to reviewing
  • Version 5.9 deleted

Thank you for raising this @wladwm.

This change seems like a reasonable small performance win. Milestoning this for 6.9, since it already has a PR.

#5 @SirLouen
6 months ago

  • Keywords needs-test-info added

I can't see any performance testing and no performance use case apart from that image that was retired 4 years ago.

I think this is required, as @johnbillion pointed out back in the day, to see how real impact with numbers.

#6 @khoipro
3 months ago

I think the Performance team should take care of this change: review and see benchmark. It should be a little bit better, but we can consider to complete fix or retire it.

#7 @westonruter
3 months ago

  • Keywords needs-refresh changes-requested added

Added a review to the PR. I agree that we should get some benchmarks on what impact this change has.

This ticket was mentioned in Slack in #core by welcher. View the logs.


8 weeks ago

#9 @welcher
8 weeks ago

This was reviewed in the bug scrub today. We're getting very close tot he beta 1 cut off, do we think the PR can be refreshed in time?

This ticket was mentioned in PR #10281 on WordPress/wordpress-develop by @dhruvang21.


8 weeks ago
#10

  • Keywords needs-refresh removed

#11 @westonruter
8 weeks ago

  • Milestone changed from 6.9 to Future Release

Punting to future release since beta1 is next week and the patch still needs refreshing.

Note: See TracTickets for help on using tickets.