-
Notifications
You must be signed in to change notification settings - Fork 17
553 feature request graphical timetable streckengrafik performance optimisation #555
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
553 feature request graphical timetable streckengrafik performance optimisation #555
Conversation
…. To improve rendering performance, we’ve introduced a lookup cache that handles frequent access more efficiently.
shenriotpro
left a comment
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 can't say I understand the logic, but I love the result :)
…. To improve rendering performance, we’ve introduced a lookup cache that handles frequent access more efficiently.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…metable-streckengrafik-performance-optimisation' into 553-feature-request-graphical-timetable-streckengrafik-performance-optimisation
|
There to many changes in sg6 - made every very bugy while rebasing. Thus i will make a new branch and merge the changes manually into. The reported bug is related to the bug we fixed |
|
After extended testing with the latest version of Netzgrafik-Editor, I came to the conclusion that the additional complexity introduced is not justified. The expected performance gain could no longer be demonstrated in a significant way. Therefore, I propose not to merge this. Many thanks to all reviewers and contributors. I believe it is always worthwhile to weigh increased complexity against actual benefit. At this moment, I don’t think there is sufficient gain. |
Description
Graphical Timetable Performance Optimization
The calculation time for the extractSectionTracks method has been significantly reduced:
These optimizations enhance responsiveness and reduce latency across browsers, especially for Edge users.
Performance Improvement: extractSectionTracks Method
Goal: Improve rendering performance of the graphical timetable by introducing caching and more efficient data structures.
Extended Functionality
Caching introduced: Added getTrainrunSectionFromCacheDuringRendering() method using a Map<number, TrainrunSection> to avoid redundant service calls.
Cache integration: The cache is now used across multiple methods:
Performance Improvements
Optimized data structure: Replaced
number[][]withUint8ArrayfordataMatrixto reduce memory usage and improve access speed.Frequency unrolling refactored: New method
extractSectionTracksUnrollFreq()handles train frequency loops more efficiently.Occupation band optimization:
extractSectionTracksFillOccupationBand()fills occupancy data with bounds checking and performance tuning.Logic Enhancements
headwayTimecalculation now uses the cache.Precomputations like
travelTimeIdxPartandbaseTimeCellIdximprove loop performanceIssues
#553
Checklist
documentation/