At Fandom, we allow users to use limit above default 500 on RecentChanges pages. Our default $wgRCLinkLimits is set to
$wgRCLinkLimits = [ 50, 100, 250, 500, 1000, 2000, 3000, 4000 ];
Over the past few MW versions, we saw slight degradation of load times for this page and we needed to lower the limit to fit into the 15s timeout that we have set for all requests. With our investigation with the profiler, it turned out that most of the time for the process is spent on rendering the same "UserLinks" and "Tags", as this is often the case that few active users will make most of the changes or the same tag is visible on RC record. This can be easily and safely optimized with the process cache (eg. MapCacheLRU), used inside the RC rendering.
Below are (not very scientific) response times before and after, we applied the optimisation on the 1.39 version of MW.
For the simple test, we have used popular wiki, where we were varying the limit value:
and here are the results:
Before
### 1000 Records ### 6171ms ### 7335ms ### 6789ms ### 2000 Records ### 12410ms ### 12951ms ### 12976ms ### 3000 Records ### No results means above 15seconds, which looking at jump ### on 1000 to 2000 would finish in ~18seconds
After
### 1000 Records ### 4072ms ### 4021ms ### 3826ms ### 4150ms ### 2000 Records ### 6906ms ### 6644ms ### 6511ms ### 3000 Records ### 9108ms ### 9564ms ### 4000 Records ### 11349ms ### 11763ms ### 5000 Records ### 14555ms ### 14870ms