-
Notifications
You must be signed in to change notification settings - Fork 46
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
timetable performance #10371
timetable performance #10371
Conversation
431c250
to
8333785
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #10371 +/- ##
=======================================
Coverage 81.79% 81.79%
=======================================
Files 1073 1073
Lines 106543 106549 +6
Branches 727 727
=======================================
+ Hits 87147 87154 +7
+ Misses 19357 19356 -1
Partials 39 39
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
8333785
to
d02fc5f
Compare
Nice, will you change the way trains are added in the list (currently 10 after 10) in a following PR ? The backend is ready to accept first train list loading and then the remaining parts and this with parallelized batches. |
f139527
to
9bc5044
Compare
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.
I'm not familiar with the virtualizer solution, but performances and code LGTM
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.
Nice and simple!
Testing with a timetable with 4k trains, the next bottleneck seems to be the conflict list. Real world data seems to contain a lot of these (I get ~15k) and it slows down the whole page significantly.
front/src/modules/trainschedule/components/Timetable/Timetable.tsx
Outdated
Show resolved
Hide resolved
front/src/modules/trainschedule/components/Timetable/Timetable.tsx
Outdated
Show resolved
Hide resolved
Other nit for the commit message title: "performance" is uncountable in this context. |
6c95476
to
f58f67c
Compare
timetable with virtualized list to limit the number of elements in the DOM Signed-off-by: Valentin Chanas <[email protected]>
Signed-off-by: Valentin Chanas <[email protected]>
503578e
to
037261c
Compare
Signed-off-by: Valentin Chanas <[email protected]>
037261c
to
dd0588c
Compare
closes #10377
Performance improvement with a 1000 trains timetable on a short path. Every single train was being re-rendered on every single frame.
improvements:
TimetableTrainCard
the 2
useCallback
s on their own prevent any re-render ofTimetableTrainCard
that are already painted.adding
VList
on top of the 2useCallback
s makes an anonymous wrapper ofTimetableTrainCard
re-render (internal stuff of the library (z prop)) but it’s still an improvement from using useCallback alone.Timing
a bit of improvement for #8575, but still slow on a click