You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice the app being very sluggish, up to a point we can call it unusable.
Record a performance trace
Notice it renders on every keystroke and the renders take about ~200 - ~250ms to complete (I'm on a Macbook air M1):
Current behavior 😯
It's just too slow. Did a quick code review and the biggest contributor to this sluggishness seems to be because we are recalculating the state for the whole page on every node we render. This is a regression that was likely introduced when we added nested scopes to the runtime to enable List and Form components.
Before that the whole page used to be calculated on every keystroke, but only once. This is also a bit wasteful, but nothing compared to doing it on every node which turns a O(n) algorithm into O(n^2) (n being the amount of nodes on the page).
Expected behavior 🤔
The page state is only calculated once for the whole page
The text was updated successfully, but these errors were encountered:
I didn't notice at the time but those changes might have an impact on the performance...
Thanks for looking into it, let me know if I can help with anything!
Edit: also we could try to create some automated checks for performance eventually, it might be useful to prevent this kind of issue
Steps to reproduce 🕹
Steps:
Run and profile the example application: Example-1: admin app #2096
Notice the app being very sluggish, up to a point we can call it unusable.
Record a performance trace
Notice it renders on every keystroke and the renders take about ~200 - ~250ms to complete (I'm on a Macbook air M1):
Current behavior 😯
It's just too slow. Did a quick code review and the biggest contributor to this sluggishness seems to be because we are recalculating the state for the whole page on every node we render. This is a regression that was likely introduced when we added nested scopes to the runtime to enable List and Form components.
Before that the whole page used to be calculated on every keystroke, but only once. This is also a bit wasteful, but nothing compared to doing it on every node which turns a O(n) algorithm into O(n^2) (n being the amount of nodes on the page).
Expected behavior 🤔
The page state is only calculated once for the whole page
The text was updated successfully, but these errors were encountered: