Skip to content

Improve map loading performance#146

Merged
giswqs merged 1 commit intomainfrom
loading
Nov 23, 2025
Merged

Improve map loading performance#146
giswqs merged 1 commit intomainfrom
loading

Conversation

@giswqs
Copy link
Copy Markdown
Member

@giswqs giswqs commented Nov 23, 2025

Load the map instantly

Copilot AI review requested due to automatic review settings November 23, 2025 06:00
@github-actions
Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request November 23, 2025 06:02 Inactive
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the map initialization code to improve loading performance by loading the map instantly. The core MapLibre library is loaded first, allowing the map to render immediately while optional plugins and protocols load asynchronously in the background.

Key changes:

  • Introduced ensureMapLibreReady() function with promise caching to manage core library loading
  • Modified loadProtocols() to accept a core library promise parameter and load plugins in parallel
  • Map initialization now proceeds as soon as core library is ready, without waiting for optional protocols

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@giswqs giswqs changed the title Improve map loading Improve map loading performance Nov 23, 2025
@giswqs giswqs merged commit 4895d46 into main Nov 23, 2025
14 checks passed
@giswqs giswqs deleted the loading branch November 23, 2025 06:04
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.

2 participants