Skip to content
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

Lazy load legend images #9393

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Lazy load legend images #9393

merged 1 commit into from
Aug 20, 2024

Conversation

arnaud-morvan
Copy link
Member

@arnaud-morvan arnaud-morvan commented Jul 16, 2024

Load https://carto.grand-chatellerault.fr/theme/ads 20x faster.

There is 793 legend images / 930 requests at loading time => 2min

Legend images are put in queue before tiles, and WMS layers, portal is not usable before 2 min.

With this change it takes 6 sec: https://lamiseretest.grand-chatellerault.fr/theme/ads

I made the PR on 2.8, but IMHO it could be backported on all supported versions.

Note: This comes with the side effect that legend images start loading after expanding the group and appear while receiving images. Not sure we need an option for this.

Examples
Storybook
API help
API documentation

Copy link
Member

@sbrunner sbrunner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks

@arnaud-morvan arnaud-morvan merged commit 03f6cc0 into 2.8 Aug 20, 2024
16 checks passed
@arnaud-morvan arnaud-morvan deleted the lazy-load-legend-images branch August 20, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants