The Popular pages bot (source code) is working, but running too slowly to complete all the reports within 1 month. Ideally, we would like the bot to complete all reports within 1 week so that the reports are actually useful for informing the work priorities of the WikiProjects. It looks like there are 6 possible solutions for improving the speed of the bot:
- Adjust the throttling in ApiHelper::getMonthlyPageviews() (may hit pageview API throttling)
- Use promises to run more requests asynchronously (may cause memory issues)
- Run multiple instances of the bot simultaneously (may hit pageview API throttling)
- Cache the results of the pageview API in a database table or persistent cache such as Redis to eliminate redundant queries
- Get the pageview API to handle redirects (T121912) (probably not a short-term solution)
- Get the pageview API to handle requests for multiple titles in one request (probably not a short-term solution)
Please evaluate these 6 approaches and create a new task that specifies our short-term (one sprint) strategy for improving the speed of the bot.