Skip to content

Don't render invisible layer catalogue items#1250

Merged
schtibe merged 1 commit intodevelopfrom
feat-less-text-truncate
Feb 20, 2025
Merged

Don't render invisible layer catalogue items#1250
schtibe merged 1 commit intodevelopfrom
feat-less-text-truncate

Conversation

@schtibe
Copy link
Contributor

@schtibe schtibe commented Feb 20, 2025

Don't render the invisible layer catalogue items. Only render them when the nested navigation is un-collapsed.
This produces quite a performance gain, as many sub-sequent components don't need rendering. This includes <TextTruncate>, where each of them creates a ResizeObserver on the DOM. Without this change we have ~1100 resize observers, with the change there are only ~250.

I will investigate those ~250 maybe in another attempt, some of them might be resolved when switching to the new tooltip.

This results in quite the performance gain, mostly noticable in development mode.

Test link

@schtibe schtibe requested review from ltkum and pakb February 20, 2025 11:28
@schtibe schtibe force-pushed the feat-less-text-truncate branch from 85f9eb2 to 0fcefed Compare February 20, 2025 11:30
@cypress
Copy link

cypress bot commented Feb 20, 2025

web-mapviewer    Run #4616

Run Properties:  status check passed Passed #4616  •  git commit 5d83ee0a6e: Merge pull request #1250 from geoadmin/feat-less-text-truncate
Project web-mapviewer
Branch Review develop
Run status status check passed Passed #4616
Run duration 01m 38s
Commit git commit 5d83ee0a6e: Merge pull request #1250 from geoadmin/feat-less-text-truncate
Committer Stefan Heinemann
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 1
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 48
View all changes introduced in this branch ↗︎

Don't render the invisible layer catalogue items. Only render them when
the nested navigation is un-collapsed.
This produces quite a performance gain, as many sub-sequent components
don't need rendering. This includes <TextTruncate>, where each of them
creates a ResizeObserver on the DOM. Without this change we have ~1100
resize observers, with the change there are only ~250.

I will investigate those ~250 maybe in another attempt, some of them
might be resolved when switching to the new tooltip.
@schtibe schtibe force-pushed the feat-less-text-truncate branch from 0fcefed to 31a717a Compare February 20, 2025 13:32
Copy link
Contributor

@pakb pakb left a comment

Choose a reason for hiding this comment

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

Good old v-show playing a trick on us, nice finding

@schtibe schtibe merged commit 5d83ee0 into develop Feb 20, 2025
9 checks passed
@schtibe schtibe deleted the feat-less-text-truncate branch February 20, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants