Skip to content

Performance Optimization: Refactor Pending Changes Logic and Save Resource Selector #11476#11484

Merged
allyoucanmap merged 9 commits intogeosolutions-it:masterfrom
rowheat02:improve/performance
Sep 19, 2025
Merged

Performance Optimization: Refactor Pending Changes Logic and Save Resource Selector #11476#11484
allyoucanmap merged 9 commits intogeosolutions-it:masterfrom
rowheat02:improve/performance

Conversation

@rowheat02
Copy link
Copy Markdown
Contributor

@rowheat02 rowheat02 commented Sep 16, 2025

Description

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Optimization
  • Refactoring

fixes #11476
fixes #11435
fixes #11458

What is the current behavior?

#11476
#11435
#11458

What is the new behavior?

  • More optimized than before, while doing UI/Map interaction.
  • No pending change Prompt shown when the map is deleted when there are some pending changes on Map page.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

Screen.Recording.2025-09-16.at.20.07.36.mov
  • compareMapChanges is out of selector and is called using debounce logic. Managed in useComputedPendingChanges

    • By default,
      • it waits for 500 ms before calling
      • if for 2000 ms, not called due to debouncing, it will be forced to call
  • Another expensive function, ' saveMapConfiguration`, is only called on demand. Will not be called infinitely while doing UI/Map Interaction

  • for Optimization, createSelector has been used on the main selector

  • Also, now, while saving a new or existing map, the mapSave payload is calculated, unlike before, taking from the selector.

@rowheat02 rowheat02 added this to the 2025.01.02 milestone Sep 16, 2025
@rowheat02 rowheat02 self-assigned this Sep 16, 2025
@rowheat02 rowheat02 marked this pull request as ready for review September 16, 2025 14:42
@allyoucanmap allyoucanmap self-requested a review September 17, 2025 07:48
@allyoucanmap allyoucanmap self-assigned this Sep 17, 2025
Copy link
Copy Markdown
Contributor

@allyoucanmap allyoucanmap left a comment

Choose a reason for hiding this comment

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

I pushed additional code that needs to be tested and reviewed in addition some tests are failing and they need to be reviewed

@allyoucanmap allyoucanmap merged commit 7a8c1af into geosolutions-it:master Sep 19, 2025
6 checks passed
@allyoucanmap
Copy link
Copy Markdown
Contributor

@ElenaGallo please test these fixes on dev and let use know if we can backport on 2025.01.xx, thanks.
Note there are 3 issue connected

@ElenaGallo
Copy link
Copy Markdown
Contributor

Test passed, @rowheat02 please backport to 2025.01.xx . Thanks

rowheat02 added a commit to rowheat02/MapStore2 that referenced this pull request Sep 22, 2025
…11458 Performance Optimization: Refactor Pending Changes Logic and Save Resource Selector geosolutions-it#11476 (geosolutions-it#11484)

---------

Co-authored-by: allyoucanmap <stefano.bovio@geosolutionsgroup.com>
allyoucanmap added a commit that referenced this pull request Sep 22, 2025
…ing Changes Logic and Save Resource Selector #11476 (#11484) (#11503)

---------

Co-authored-by: allyoucanmap <stefano.bovio@geosolutionsgroup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants