Page MenuHomePhabricator

Show cached information on NewcomerTasksInfo special page
Closed, ResolvedPublic

Description

The page (https://ru.wikipedia.org/wiki/Special:NewcomerTasksInfo) is very useful, but it takes a long time to load (about 10 sec). Maybe display cached information once an hour or half an hour? Is it possible?

Event Timeline

Hello, thanks for creating the task! The special page is supposed to be already cached for an hour (first load takes longer time [as the page is computing the counts], subsequent loads finish quickly). However, with this page, it is likely that you're the first visitor in that hour, and thus you need to wait for the information to compute.

The cache TTL can be increased, but that would limit its usefulness when making config changes – if the TTL was one day, you would need to wait for one day to see what your changes did to the task pool (and, honestly, I think that even with one day TTL, it's still pretty likely you'd be the first one loading it).

I hope this makes sense. Best, Martin.

Hello, thanks for creating the task! The special page is supposed to be already cached for an hour (first load takes longer time [as the page is computing the counts], subsequent loads finish quickly).

Hi! :) Then I'm afraid there is somewhere an error. I have a load lag every minute.

Tgr added a subscriber: Tgr.

Moving to current sprint to check if caching works.

kostajh triaged this task as Medium priority.May 26 2021, 12:29 PM
kostajh added a subscriber: kostajh.

Caching seems to work now. I had checked at the time this task was filed, and it wasn't working, so I assume there was some infrastructure issue around that date.

Ha, no it's not. Here's a profile in XHGui after reloading the page: https://performance.wikimedia.org/xhgui/run/view?id=60ae4037bf9337094c836bec

But the cache miss seems to be intermittent.

Change 695290 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] SuggestionsInfo: set useCache=false when calling suggest

https://gerrit.wikimedia.org/r/695290

Change 695291 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] SuggestionsInfo: Use anonymous user identity value

https://gerrit.wikimedia.org/r/695291

Change 695290 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] SuggestionsInfo: set useCache=false when calling suggest

https://gerrit.wikimedia.org/r/695290

Change 695291 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] SuggestionsInfo: Use anonymous user identity value

https://gerrit.wikimedia.org/r/695291

Change 696588 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Force caching in NewcomerTasksInfo

https://gerrit.wikimedia.org/r/696588

Change 696588 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Force caching in NewcomerTasksInfo

https://gerrit.wikimedia.org/r/696588

Change 700257 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/extensions/GrowthExperiments@master] [DNM] Use "lockTSE" for slow SpecialNewcomerTasksInfo cache key

https://gerrit.wikimedia.org/r/700257

Checked in wmf.12 (ruwiki, cswiki, arwiki and bnwiki in Firefox, Chrome, and Safari). The initial load of Special:NewcomerTasksInfo page might take >10 sec. After that, navigating back to Special:NewcomerTasksInfo, entering in the Search field and going to the page, or pasting the url link - Special:NewcomerTasksInfo loads practically instantaneously (Chrome Lighthouse reports First Contentful Paint/Time to Interactive 0.7s).

The scenario for the initial load:

  • on a wiki where you haven't visit Special:NewcomerTasksInfo, paste Special:NewcomerTasksInfo in the Search box
  • click on the suggestion for Special:NewcomerTasksInfo - the results below are for eswiki
Finish: 20.07 s
DOMContentLoaded: 19.64 s
Load: 19.88 s

@kostajh - could that initial load time be improved? Or it's not in the scope of this ticket patches?

Checked in wmf.12 (ruwiki, cswiki, arwiki and bnwiki in Firefox, Chrome, and Safari). The initial load of Special:NewcomerTasksInfo page might take >10 sec. After that, navigating back to Special:NewcomerTasksInfo, entering in the Search field and going to the page, or pasting the url link - Special:NewcomerTasksInfo loads practically instantaneously (Chrome Lighthouse reports First Contentful Paint/Time to Interactive 0.7s).

The scenario for the initial load:

  • on a wiki where you haven't visit Special:NewcomerTasksInfo, paste Special:NewcomerTasksInfo in the Search box
  • click on the suggestion for Special:NewcomerTasksInfo - the results below are for eswiki
Finish: 20.07 s
DOMContentLoaded: 19.64 s
Load: 19.88 s

@kostajh - could that initial load time be improved? Or it's not in the scope of this ticket patches?

We should trigger it from the cron script that generates statistics for our dashboard (https://grafana.wikimedia.org/d/vGq7hbnMz/special-homepage-and-suggested-edits?orgId=1), so the data will almost always be cached when a user arrives on the page.

maintenance/listTaskCounts.php is similar to, but has separate code from, SpecialNewcomerTasks.info.php and SuggestionsInfo.php. We should rework those three to work better together. Filed as T286183: Rework maintenance/listTaskCounts.php to use SuggestionsInfo