One of the problems with the current
MenuRenderer is, that it takes far too long to build the menus for large page trees.
Now, for my current project, we have ~93k pages and the current implementation of the MenuRenderer is unusable, because
after publishing one arbitrary page, it rebuilds the whole tree – this requires about 8 seconds. Even if the tree is cached, it takes
~1 second only to fetch all the menu nodes out of the cache.
Since in my case, only a small part of the menu has to be rebuild, it makes much more sense to rebuild the menu tree
partially, and to only cache that partial representation. Then, instead of fetching 93k nodes from the cache, only a few hundreds
have to be transferred. However, since such implementations may vary from project to project, it makes most sense to make the
MenuRenderer configurable through a settings variable (say CMS_MENU_RENDERER), so that smaller django-CMS installations
can rely on the default implementation.
and it looks very promising. The time to render CMS pages dropped from a minimum of >1 second to a maximum of about 200ms. This
means that my implementation is 5x faster without caching, than the default implementation with caching.
If the core maintainers of Django-CMS are interested in this change, please tell me, so that I can prepare my changes as a pull-request.
In any case, it would be hugely beneficial to the django-CMS ecosystem, because the current implementation is a show-stopper for
sites with more than a few thousand pages.
– Jacob