The Special:ContentTranslationStats page is increasingly getting slow because of huge amount of historic data it need to query and fetch. As per the current design it displays data since the launch of CX in 2015. Occassional spikes in the translation caused the display of weekly translations less useful.
As per 22 Dec 2022, the whole page took 22 seconds to load for me.
- 2811ms for https://en.wikipedia.org/w/api.php?action=query&format=json&list=contenttranslationlangtrend
- 7918ms for https://en.wikipedia.org/w/api.php?action=query&format=json&list=contenttranslationlangtrend&target=en
- 18772ms for https://en.wikipedia.org/w/api.php?action=query&format=json&list=contenttranslationstats
At the same time, all these data are important and interesting to the team. Realtime trends in translation per language is important in many aspects and decision making. Cumulative translation and translator stats are also helpful.
Some ideas:
- Only fetch and display data for recent time- for example, last one year
- Remove this special page completely use dashboards that are not part of mediawiki extension. Example, a superset dashboard. or any such visualization that allows date range selection and language selection
- Improve Special:CXStats to have date range selection and language selection
I won't recommend more work on Special:CXStats because a MW extension and special page is not a good place to display such information(Historically, we had reasons to have this special page). There are analytics dashboards for the purpose. Moving this outside of an extension deployed in almost all wikis make its maintanance, design constraints more manageable.
There are many open tickets to improve this page, all requiring development effort on enhancing data visualization and processing on top of the CX Mediawiki Extension. It is better to reuse our existing analytics infrastructure for these needs instead of building in a MediaWiki extension.