-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Performance issue when opening the widget admin page #8749
Comments
Continuing from #8750: A generic-purpose solution to this could be to optionally move the layer filtering to the server-side. Right now, when you open the Widgets page and select any layer, you still see the widgets from each layer and you can hide/show the widgets of each layer on the client-side using the layer list on the right side. This could be overridden for example by adding a site setting, which, when enabled would filter the displayed widgets down to the selected layer only by using an override of GetWidgets (with It can be taken one step further by the above site setting just providing a default value and the Widgets screen having an additional checkbox for the same purpose, but its value stored in a cookie, so admins can switch between the two behaviors for themselves. |
Just for the sake of discussion, the things we could filter widgets on for that action are:
So I think the site setting should definitely let admins select default layers whose widgets are loaded/shown; probably nothing else. I like the approach of using the cookie for admins so they may override their own setting, but I'm not sure I'd actually implement it, unless there is a trivial way to handle this: |
What I meant by site setting is just a simple checkbox: When enabled, the filtering happens entirely on the server-side based on the dropdown and the right-side list on the Widgets page for client-side filtering is hidden, because it becomes dysfunctional. To expand on that, the cookie-based setting is also just a checkbox that takes precedence over the site setting. |
I see. |
That sounds good in principle, although I'd advise against such an overhaul of the UI unless you can keep the current behavior going (because it's not a common problem) and you really really need it to work like this. On the other hand, you can address the performance issue by adding just a single checkbox setting and 1 line changed in the controller. |
What does OC do? I believe we designed it to be efficient, and nobody has complained so far. |
Orchard/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs
Line 87 in 97648ed
When many content pages contain widgets we experience perfomance issues as the widget admin page takes even some minutes to open
The text was updated successfully, but these errors were encountered: