-
Notifications
You must be signed in to change notification settings - Fork 11
ROU-12504: Performance improvements for Markers and MarkerCluster #244
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
611346c
Performance improvements for Markers and MarkerCluster
os-davidlourenco 0606d1b
Corrected some code comments
os-davidlourenco 05c2296
Added ADR files for maps
os-davidlourenco eda9922
Reverted incorrect changes and fixed documentation files
os-davidlourenco 9ec6740
Corrections on the MarkerManager to ensure compatibility with blocks …
os-davidlourenco 943b36f
Correction on the MarkerManager logic
os-davidlourenco 8429a35
Corrections to the documentation
os-davidlourenco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,5 @@ code/*.bat | |
| code/package-lock.json | ||
| package-lock.json | ||
|
|
||
| docs/* | ||
| !docs/Licenses | ||
| !docs/README.md | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| <!-- This is an ADR template, follow the same convention for future ADRs --> | ||
|
|
||
| # ADR-0000: Title of ADR | ||
|
|
||
| ## Status | ||
|
|
||
| Proposed/Accepted/Rejected/Superseded by ADR-XXXX | ||
|
|
||
| ## Context | ||
|
|
||
| What is the issue that we're seeing that is motivating this decision or change? | ||
| What is the current architectural state relevant to this decision? | ||
| What are the constraints (technical, business, etc.)? | ||
|
|
||
| ## Decision Drivers | ||
|
|
||
| - Driver 1 | ||
| - Driver 2 | ||
| - ... | ||
|
|
||
| ## Considered Options | ||
|
|
||
| - Option 1 | ||
| - Pros: | ||
| - Cons: | ||
| - Option 2 | ||
| - Pros: | ||
| - Cons: | ||
| - ... | ||
|
|
||
| ## Decision Outcome | ||
|
|
||
| Chosen option: "Option X", because [justification. e.g., only option that meets k.o. criteria decision driver | satisfies critical requirement | ... | comes out best (see below)]. | ||
| Positive consequences: | ||
|
|
||
| - ... | ||
| Negative consequences: | ||
| - ... | ||
|
|
||
| ## Links | ||
|
|
||
| - Link to related issues, discussions, or documents. | ||
|
|
||
| ## Date | ||
|
|
||
| YYYY-MM-DD |
os-davidlourenco marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| <!-- This is an ADR template, follow the same convention for future ADRs --> | ||
|
|
||
| # ADR-0001: Google Markers and Marker Cluster draw phase | ||
|
|
||
| ## Status | ||
|
|
||
| Accepted | ||
|
|
||
| ## Context | ||
|
|
||
| When a developer places a large number of Markers on a map with clustering enabled, the rendering process becomes overwhelming. This causes the browser to freeze, resulting in significant delays before the Markers and Marker Clusters appear to the user. | ||
|
|
||
| After investigation, it was perceived that adding Markers to the cluster was the root cause of this behavior. Specifically, every time a new Marker is added to a cluster, a redraw is triggered using the existing visual tree. The operation to add a new Marker to the visual tree is computationally expensive and causes the browser to crash or hang. | ||
|
|
||
| Furthermore, in a method called after the addition of the Marker to the cluster, a repaint of the Marker Cluster is triggered. This action is less expensive than the "redraw after add" because it creates a new visual tree rather than modifying the existing one. | ||
|
|
||
| Constraints: | ||
|
|
||
| - Avoid breaking changes for the developer and the runtime experience. | ||
| - Keep fixes minimal and localized so they are easier for developers to adopt. | ||
|
|
||
| ## Decision Drivers | ||
|
|
||
| - Keep changes minimal and reversible. | ||
| - Maintain existing behavior. | ||
| - Improve the performance of the overall interaction. | ||
|
|
||
| ## Considered Options | ||
|
|
||
| - Option 1: Create new client actions for bulk additions | ||
| - Pros: This would optimize the overall draw flow, making it as efficient as possible. It avoids multiple redraws by calling for a repaint only after all new Markers are added. | ||
|
|
||
| - Cons: This would require a higher effort from developers to implement the changes. Additionally, it would necessitate further documentation and significant changes to the codebase to achieve the desired behavior. | ||
| - Option 2: Disable draw on addition moment but keep the repaint after addition | ||
| - Pros: The difference in performance is significant. It would require no changes for developers to adopt and no need for new documentation. | ||
| - Cons: Some discarded repaints will occur, meaning the performance will not be theoretically optimal, though still improved. | ||
|
|
||
| ## Decision Outcome | ||
|
|
||
| Chosen option: "Option 2", because it is the only option that allows for performance benefits to reach the majority of users and developers quickly. It is also the best option to ensure that minimal changes are implemented with minimal impact on already developed applications. | ||
|
|
||
| Positive consequences: | ||
|
|
||
| - Increased overall performance of Markers, especially when using Marker Clusters. | ||
|
|
||
| Negative consequences: | ||
|
|
||
| - No negative consequence found. | ||
|
|
||
| ## Links | ||
|
|
||
| - ROU-12504 | ||
|
|
||
|
|
||
os-davidlourenco marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ## Date | ||
|
|
||
| 2026-02-10 | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Architecture Decision Records (ADRs) | ||
|
|
||
| This directory contains Architecture Decision Records (ADRs) for this project. | ||
| ADRs are short documents that capture important architectural decisions, along with their context and consequences. | ||
|
|
||
| ## Purpose | ||
|
|
||
| - To document significant architectural decisions. | ||
| - To provide context for why decisions were made. | ||
| - To help onboard new team members. | ||
| - To facilitate future architectural discussions and evolution. | ||
| - To provide context to AI-powered development assistants. | ||
|
|
||
| ## Format | ||
|
|
||
| Each ADR should follow the template in `ADR-0000-Title-of-ADR.md`. | ||
|
|
||
| ## Process | ||
|
|
||
| 1. **Propose:** Copy `ADR-0000-Title-of-ADR.md` to a new file named `NNNN-title-of-adr.md`, where `NNNN` is the next sequential number and the rest is a dash-separated, lowercase version of the title. | ||
| 2. **Discuss:** Fill out the ADR and discuss it with the team. | ||
| 3. **Decide:** Once a decision is reached, update the status in the ADR (e.g., "Accepted", "Rejected", "Superseded"). | ||
| 4. **Commit:** Commit the ADR to the repository. | ||
|
|
||
| ## ADR Log | ||
|
|
||
| | ADR Number | Title | Status | Date | | ||
| | :--------- | :---------------------------------------------------------------- | :------- | :---------------------------------- | | ||
| | ADR-0000 | Template for ADRs | Meta | 2026-02-04 | | ||
| | ADR-0001 | Use AI for Development Assistance | Accepted | 2026-02-04 | | ||
| | ADR-0002 | Highcharts TypeScript typings compatibility fixes v12 Assistance | Accepted | 2026-02-04 | |
This file contains hidden or 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
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.