fixLinkRecommendationData.php in GrowthExperiments has CirrusSearch::resetWeightedTags() in its inner loop, and that loop is werdly slow. Sometimes issuing a reset is around 0.1s, sometimes it's 5-10s. Since all that method does is enqueue a job, that's very surprising.
Description
Related Objects
Event Timeline
@Tgr where are you seeing the data about the slow performance? Is this something you think our team should work on, or Discovery-Search?
I ran the script with the --verbose flag and it went through users very quickly for a while but then "froze" for something like half a minute. Recently I haven't used the flag so I'm not sure if it's still happening.
The script took a few hours to run on all databases, which is fine for something we only use a couple times a year, and this seems hard to debug (could be an issue in our code, the search code, the job queue code, something might be waiting on some kind of lock, which might be only happening in production...) so I'd say we ignore it unless it becomes more of a practical problem.
If it does become a practical problem, supporting batching in CirrusSearch::resetWeightedTags() is probably still a lower-hanging fruit than figuring out what's happening (might or might not help but it's easy and does not involve lots of poking in the dark).