Skip to content
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

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

Merged
merged 4 commits into from
May 19, 2022

Conversation

pepijnve
Copy link
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
Copy link

github-actions bot commented May 16, 2022

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

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 <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>
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 <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>
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 <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>
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 <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>
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 <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>
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 <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>

Co-authored-by: Pepijn Van Eeckhoudt <[email protected]>
Co-authored-by: Mikhail Shabarov <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>
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 <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>

Co-authored-by: Pepijn Van Eeckhoudt <[email protected]>
Co-authored-by: Mikhail Shabarov <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>
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 <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>

Co-authored-by: Pepijn Van Eeckhoudt <[email protected]>
Co-authored-by: Mikhail Shabarov <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>
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 <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>

Co-authored-by: Pepijn Van Eeckhoudt <[email protected]>
Co-authored-by: Mikhail Shabarov <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>
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 <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>

Co-authored-by: Pepijn Van Eeckhoudt <[email protected]>
Co-authored-by: Mikhail Shabarov <[email protected]>
Co-authored-by: Soroosh Taefi <[email protected]>
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