-
Notifications
You must be signed in to change notification settings - Fork 824
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
Improve dropdown rendering speed #10838
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failing tests are related, please review.
Apart from that, I'm not personally sure about this change. I get that preparing the list in PHP might be faster, but with that (at a stretch) we can scrape the whole templating system and do everything in PHP.
@michalkleiner yes i'm not sure why the tests are failing i need to review this and see what are the tests doing the template system is fine for simple things, but not great for loops. rendering large list of items (eg: a dropdown with country names) is quite slow. i do think there is an issue with the templating system itself, but that's clearly out of scope :-) |
Saw the comment here so I got more context now. Let's see what other @silverstripe/core-team thinks about the topic. |
@michalkleiner tests all green ;-) |
Co-authored-by: Michal Kleiner <[email protected]>
I don't like this change. If there's a problem with the templating system that makes it too slow for this and similar scenarios, then resolving that problem is the fix. This feels like a project-level workaround. I especially agree with Michal's comment: "I get that preparing the list in PHP might be faster, but with that (at a stretch) we can scrape the whole templating system and do everything in PHP." |
@GuySartorelli i agree with you: i don't like this change. but when a page takes 2 times more to render because of a couple of dropdowns, that's not something that can be ignored either :-) ideally, i think profiling should be done on the templating system and see where are the bottlenecks |
Fixes #10174