-
Notifications
You must be signed in to change notification settings - Fork 12
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
PB-259: Improve startup performance by rendering menu section only when the map is rendered #663
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Passing run #758 ↗︎
Details:
Review all test suite changes for PR #663 ↗︎ |
…active layer rendering The rendering of catalogue is very costly and store events would re-trigger it therefore wait that the map has been rendered before rendering the catalogue, it is anyway not visible at startup until the user click on the menu entry. It still needs to be always rendered once the application has been started, otherwise the toggling of the menu would be too slow. Also differ the rendering and opening of the active layers for the same reason and also because if the menu contains external layer (e.g. kml, gpx, ...) the application needs to load its metadata/data before rendering the correct name in the list. For kml and GPX it would use at startup the default KML or GPX name until the name has been loading. By defering the active layers list we avoid having the name changing.
The drawing test `keeps the kml after a page reload, ...` was flaky and failed due to a race condition. This test has been improved to avoid race condition. Other tests using the cy.reload() have been also slightly improve by waiting the mapIsReady before continuing avoiding race condition.
ltshb
force-pushed
the
feat-PB-259-performance-menu-off
branch
from
February 28, 2024 05:54
1a856a9
to
4af0246
Compare
ltshb
changed the title
PB-259: Performance menu on map rendered
PB-259: Improve startup performance by rendering menu section only when the map is rendered
Feb 28, 2024
Do not log for non watched mutation because this is missleading in the logs. There is already anther global mutation watcher that logs all mutations.
pakb
approved these changes
Feb 28, 2024
Comment on lines
+259
to
+261
Cypress.Commands.add('waitMapIsReady', ({ timeout = 15000 } = {}) => { | ||
cy.waitUntilState((state) => state.app.isMapReady, { timeout: timeout }) | ||
}) |
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.
It might make sense to use this in the ubiquitous .goToMapView
command, don't you think?
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.
It is already Part of it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The rendering of catalogue is very costly and store events would re-trigger it
therefore wait that the map has been rendered before rendering the catalogue,
it is anyway not visible at startup until the user click on the menu entry.
It still needs to be always rendered once the application has been started, otherwise
the toggling of the menu would be too slow.
Also differ the rendering and opening of the active layers for the same reason
and also because if the menu contains external layer (e.g. kml, gpx, ...) the
application needs to load its metadata/data before rendering the correct name
in the list. For kml and GPX it would use at startup the default KML or GPX
name until the name has been loading. By defering the active layers list
we avoid having the name changing.
Several other options has been tried but they did not improve the performances:
Test link