Repository navigation
🧪 Add Performance Test For Memory Usage - #439
Merged
Merged
Conversation
rabea-al
marked this pull request as ready for review
August 28, 2025 06:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new test file
reload_performance_test.pydesigned to measure memory performance during the "Reload All Nodes" operation in Xircuits.Key aspects of the test:
Measures JS heap usage after each reload (excluding warm-up).
Measures total DOM node count before and after reload for diagnostics.
Fails if:
MAX_DELTA_MBMAX_NET_GROWTH_MBThe thresholds used were established based on multiple local test runs and represent a reasonable performance baseline for the current
LargeCanvas.xircuitsworkflow.To verify that reloading works correctly, one node was edited to remove its
dayoutput port. The test ensures that after reload, thedayport reappears, confirming that node updates are successfully applied.The test was run on both pre-PR and post-PR (Fahreza’s fix) versions. Below are the results using the same canvas:
Before PR (bad memory performance):
After PR (good memory performance):
Also added echo markers in run-ui-tests.yml around the new test to improve error traceability in GitHub Actions logs.
References
Depends on xai-tests#4 which adds the LargeCanvas.xircuits test canvas used in this performance test.
Pull Request Type
Type of Change
Tests
To run the test locally, please follow the setup and usage instructions in the README.md file
Tested on? Specify Version.