Page MenuHomePhabricator

Performance: Update text and ID fields simultaneously
Closed, ResolvedPublic

Description

Right now UserMerge::mergeUser() updates ID fields (e.g., ar_user) and text fields (e.g., ar_user_text) in separate queries. Considering ar_user and ar_user_text should be exactly the same for a logged in user, you could cut the number of DB queries in half by combining them. For large wikis, this may save a significant amount of time since it doesn't have to scan each table twice.


Version: unspecified
Severity: enhancement

Details

Reference
bz49520

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:45 AM
bzimport set Reference to bz49520.

just a suggestion to the bug listeners:

perhaps someone of you can help and recode the specific subroutine UserMerge::mergeUser() in the proposed way, I am sure you can code this more elegant and quickly than I can do.

anyway: I noted your valid point, the db access should be improved in this old code.

Be reminded that I am not the maintainer or project owner of that extension (I placed a request, but this wasn't accepted yet.)

Related URL: https://gerrit.wikimedia.org/r/69017 (Gerrit Change Ibb36ef49e99246e502835f51ab6776422b62438d)

Patch was merged nearly a year ago.