Skip to content

fix: Avoid potential slow Set#removeAll call in HierarchicalCommunicator - #13746

Merged
taefi merged 4 commits into
vaadin:masterfrom
pepijnve:hierarchical_perf
May 19, 2022
Merged

taefi merged 4 commits into
vaadin:masterfrom
pepijnve:hierarchical_perf

Conversation

@pepijnve

Copy link
Copy Markdown
Contributor

Description

The performance of calling Set#removeAll(List) is dependent on the relative sizes of the Set and List parameter. Replace Set#removeAll with List#forEach(Set::remove) to avoid this.

Fixes #13745

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

…tionController#passivateInactiveKeys

The performance of calling Set#removeAll(List) is dependent on the relative sizes of the Set and List parameter. Replace Set#removeAll with List#forEach(Set::remove) to avoid this.

Fixes vaadin#13745
@vaadin-bot vaadin-bot added +0.0.1 and removed +1.0.0 labels May 16, 2022
@mshabarov mshabarov changed the title fix: Avoid potential slow Set#removeAll call in HierarchicalCommunica… fix: Avoid potential slow Set#removeAll call in HierarchicalCommunicator May 16, 2022
@github-actions

github-actions Bot commented May 16, 2022 •

Copy link
Copy Markdown
Contributor

Unit Test Results

   965 files  +  24     965 suites  +24   48m 31s ⏱️ + 6m 0s
6 274 tests +158  6 226 ✔️ +159  48 💤 ±0  0 ❌ ±0 
6 497 runs  +156  6 443 ✔️ +157  54 💤 ±0  0 ❌ ±0 

Results for commit 5206c5f. ± Comparison against base commit 6a5710d.

♻️ This comment has been updated with latest results.

@taefi
taefi enabled auto-merge (squash) May 19, 2022 11:48
@taefi
taefi disabled auto-merge May 19, 2022 13:02
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@taefi
taefi enabled auto-merge (squash) May 19, 2022 13:35
@taefi
taefi merged commit ab2b80d into vaadin:master May 19, 2022
vaadin-bot pushed a commit that referenced this pull request May 19, 2022
…tor (#13746)

* fix: Avoid potential slow Set#removeAll call in HierarchicalCommunicationController#passivateInactiveKeys

The performance of calling Set#removeAll(List) is dependent on the relative sizes of the Set and List parameter. Replace Set#removeAll with List#forEach(Set::remove) to avoid this.

Fixes #13745

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
vaadin-bot pushed a commit that referenced this pull request May 19, 2022
…tor (#13746)

* fix: Avoid potential slow Set#removeAll call in HierarchicalCommunicationController#passivateInactiveKeys

The performance of calling Set#removeAll(List) is dependent on the relative sizes of the Set and List parameter. Replace Set#removeAll with List#forEach(Set::remove) to avoid this.

Fixes #13745

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
vaadin-bot pushed a commit that referenced this pull request May 19, 2022
…tor (#13746)

* fix: Avoid potential slow Set#removeAll call in HierarchicalCommunicationController#passivateInactiveKeys

The performance of calling Set#removeAll(List) is dependent on the relative sizes of the Set and List parameter. Replace Set#removeAll with List#forEach(Set::remove) to avoid this.

Fixes #13745

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
vaadin-bot pushed a commit that referenced this pull request May 19, 2022
…tor (#13746)

* fix: Avoid potential slow Set#removeAll call in HierarchicalCommunicationController#passivateInactiveKeys

The performance of calling Set#removeAll(List) is dependent on the relative sizes of the Set and List parameter. Replace Set#removeAll with List#forEach(Set::remove) to avoid this.

Fixes #13745

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
vaadin-bot pushed a commit that referenced this pull request May 19, 2022
…tor (#13746)

* fix: Avoid potential slow Set#removeAll call in HierarchicalCommunicationController#passivateInactiveKeys

The performance of calling Set#removeAll(List) is dependent on the relative sizes of the Set and List parameter. Replace Set#removeAll with List#forEach(Set::remove) to avoid this.

Fixes #13745

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
mshabarov added a commit that referenced this pull request May 20, 2022
…tor (#13746) (#13814)

* fix: Avoid potential slow Set#removeAll call in HierarchicalCommunicationController#passivateInactiveKeys

The performance of calling Set#removeAll(List) is dependent on the relative sizes of the Set and List parameter. Replace Set#removeAll with List#forEach(Set::remove) to avoid this.

Fixes #13745

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>

Co-authored-by: Pepijn Van Eeckhoudt <pepijn@vaneeckhoudt.net>
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
mshabarov added a commit that referenced this pull request May 20, 2022
…tor (#13746) (#13818)

* fix: Avoid potential slow Set#removeAll call in HierarchicalCommunicationController#passivateInactiveKeys

The performance of calling Set#removeAll(List) is dependent on the relative sizes of the Set and List parameter. Replace Set#removeAll with List#forEach(Set::remove) to avoid this.

Fixes #13745

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>

Co-authored-by: Pepijn Van Eeckhoudt <pepijn@vaneeckhoudt.net>
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
mshabarov added a commit that referenced this pull request May 20, 2022
…tor (#13746) (#13815)

* fix: Avoid potential slow Set#removeAll call in HierarchicalCommunicationController#passivateInactiveKeys

The performance of calling Set#removeAll(List) is dependent on the relative sizes of the Set and List parameter. Replace Set#removeAll with List#forEach(Set::remove) to avoid this.

Fixes #13745

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>

Co-authored-by: Pepijn Van Eeckhoudt <pepijn@vaneeckhoudt.net>
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
mshabarov added a commit that referenced this pull request May 20, 2022
…tor (#13746) (#13816)

* fix: Avoid potential slow Set#removeAll call in HierarchicalCommunicationController#passivateInactiveKeys

The performance of calling Set#removeAll(List) is dependent on the relative sizes of the Set and List parameter. Replace Set#removeAll with List#forEach(Set::remove) to avoid this.

Fixes #13745

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>

Co-authored-by: Pepijn Van Eeckhoudt <pepijn@vaneeckhoudt.net>
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
mshabarov added a commit that referenced this pull request May 20, 2022
…tor (#13746) (#13817)

* fix: Avoid potential slow Set#removeAll call in HierarchicalCommunicationController#passivateInactiveKeys

The performance of calling Set#removeAll(List) is dependent on the relative sizes of the Set and List parameter. Replace Set#removeAll with List#forEach(Set::remove) to avoid this.

Fixes #13745

Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>

Co-authored-by: Pepijn Van Eeckhoudt <pepijn@vaneeckhoudt.net>
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Co-authored-by: Soroosh Taefi <taefi.soroosh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slow UIDL generation when scrolling through large grids

4 participants