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

Call getNumberOfChildren() less in iterator. #6279

Merged
merged 1 commit into from Apr 27, 2023

Conversation

cody-littley
Copy link
Contributor

@cody-littley cody-littley commented Apr 27, 2023

Closes #6278

Emergency mitigation for performance issue noticed by Oleg where calling parent.getNumberOfChildren() ends up being very expensive due to the way Java does inheritance and virtual methods.

This is not a full fix, but will reduce the number of times this method is called to 1/4th its previous number (for binary trees).

Signed-off-by: Cody Littley <cody@swirldslabs.com>
@github-actions
Copy link

Node: Unit Test Results

  1 317 files    1 317 suites   1h 16m 54s ⏱️
97 180 tests 97 173 ✔️ 7 💤 0
98 822 runs  98 815 ✔️ 7 💤 0

Results for commit 6a0d087.

@sonarcloud
Copy link

sonarcloud bot commented Apr 27, 2023

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
No Duplication information No Duplication information

@github-actions
Copy link

Node: E2E Test Results

    1 files      1 suites   17m 7s ⏱️
309 tests 309 ✔️ 0 💤 0
327 runs  327 ✔️ 0 💤 0

Results for commit 6a0d087.

@github-actions
Copy link

Node: Integration Test Results

    3 files      3 suites   14m 54s ⏱️
150 tests 150 ✔️ 0 💤 0
151 runs  151 ✔️ 0 💤 0

Results for commit 6a0d087.

@github-actions
Copy link

Platform: JUnit Test Report

     499 files           1 errors  498 suites   28m 54s ⏱️
13 573 tests 13 532 ✔️ 41 💤 0
15 356 runs  15 315 ✔️ 41 💤 0

Results for commit 6a0d087.

@sonarcloud
Copy link

sonarcloud bot commented Apr 27, 2023

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@cody-littley cody-littley merged commit 6fdc9dd into develop Apr 27, 2023
29 of 31 checks passed
@cody-littley cody-littley deleted the 06278-get-num-children branch April 27, 2023 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Call parent.getNumberOfChildren() less
3 participants