Sitecore locked items list is slow


After upgrading to Sitecore 9. We were experiencing poor performance while using the locked items list. Luckily the problem was easily fixed.
Here are a few pointer to what were done to optimize performance for this module.
First of all we disabled the counter for users number of locked items i the Experience Editor.

This is done with a configuration file like this

  <configuration xmlns:patch="">
        <setting name="WebEdit.ShowNumberOfLockedItemsOnButton">
          <patch:attribute name="value">false</patch:attribute>

Well this does not quite does the job. When using the functionality the rendering of the list is still slow.
This can be fixed with this guide Solution 4 is your friend here. :)

Thanks to my dear colleague Daniel for tracking this one down.