verbb / navigation

A Craft CMS plugin to create navigation menus for your site.
Other
90 stars 22 forks source link

Performance with many navigation entries #349

Open sarahschuetz opened 1 year ago

sarahschuetz commented 1 year ago

Question

Hi! 😊

We are planning to use the navigation plugin on a new project which has quite a heavy navigation. Are there any known troubles we could run into if we have thousands or more navigation nodes?

Thanks, Sarah

Additional context

For example, we are thinking about PHP max_input_vars or PHP memory_limit, but we were wondering if there is any experience in general with very large navigations regarding performance or any known limitations.

engram-design commented 1 year ago

If you're talking rendering a thousand nodes, then yes there are some things to consider. Navigation nodes aren't inherently expensive to render, but the same would apply as if you were rendering thousands of entries on a single render.

No PHP memory limits to speak of, but I would recommend to employ either template caching or static caching to alleviate rendering troubles.

For an IA of that size, I would possibly recommend only loading paths as you need. I'm not sure what your use-case or IA structure looks like, but I would hardly think you need to view thousands of nodes every time a user wants to navigate somewhere. Even something like a mega menu, you could lazy-load items when rendering.

But that's all an implementation detail. Navigation itself doesn't impose a limit on the nodes you can use.

sarahschuetz commented 1 year ago

Is there lazy loading or pagination in the Craft Admin panel? I am a little bit worried about backend performance.