-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relation widget performance optimization #3739
Comments
@jozsi what's your CMS version? |
@barthc, I use the latest versions: |
@jozsi I assume you are on |
@barthc: I use the GitHub backend, yes. But it makes 17.5k requests, when they are cached, still takes 2 minutes to load and meanwhile it slows down the whole browser (Chrome on latest gen i7 CPU and NVMe disk). Maybe a little memoization could help? |
Between how many published entries do you have in the |
I've 15 category and 123 food entries. I'll add you as a collaborator to the repository & netlify app, if it helps to reproduce. Feel free to fork it. PS: I am currently using the the @ncwidgets/netlify-cms drop-in that's basically a wrapper |
@erezrokah I think this issue is related to #3584, do we fall back to the previous approach for |
I'll have to investigate, but the previous approach will be to get those entries from IndexDB (you won't see any requests but it would still access the browser storage). |
Yep, that's what I am plan to do for the categories. Been waiting for the aforementioned PR to be merged, but I'll try with the custom widget and see how I could implement it for products as well, in a Hugo friendly way (I used a Hugo template from Netlify for this project, to see how it compares to Gatsby that I like a lot - and will stick to it in the future). |
Hello,
I have a list of categories nested with lists of products, all of them beign relationship widgets. When I open the CMS editor, it fires thousands of XHR requests for about 150 relations. Is it a possible bug?
First I thought that having the lists collapsed, it will only start the API calls on expand, but later I realized it's not just the autocomplete selector that needs the data, but it's also used for
fieldsMetaData
of custom preview templates and possibly other internal stuff.I suppose
@ncwidgets/file-relation
of @d4rekanguok could come handy for the categories part (~20 relations), but I don't think I could do the same for the products because there can be many relations of the same product in different positions/order.What's the best approach to handle this?
Thank you!
Example code:
config.yml
menu.md
The text was updated successfully, but these errors were encountered: