mattmilburn / strapi-plugin-menus

A plugin for Strapi CMS to customize the structure of menus and menu items.
MIT License
110 stars 27 forks source link

Bad performance using nested and populate together #134

Open MattPryze opened 10 months ago

MattPryze commented 10 months ago

Sending a REST API request in the format /api/menus/1?nested&populate=* leads to some pretty poor performance.

Getting a menu with about 100 items takes around 1000ms each time.

I'm using SQLite for my database and would rather not change it as all other requests are running fast.

I tried using the REST cache plugin, but it didn't seem to have any effect. I suppose I may be configuring it incorrectly?

Is this the expected behavior of this call? Is there a better way to quickly grab my nested menu on page load?

MattPryze commented 10 months ago

This may not be the fault of this plugin I'm learning. Looks like any request I make to a json field of this size, even outside this plugin, has the same speed. But if I format the field as string and just parse it after receiving it, it's only a few ms.