Conversation
…ip preplotting hidden sub components of an area (the option is by default alse). Also improved general performance.
There was a problem hiding this comment.
Pull request overview
This PR introduces a performance optimization by adding lazy plotting of sub-components. The main change is a new pre_plot_sub_components parameter (defaulting to false) in the GUI constructor that defers plotting of hidden area sub-components until they are explicitly opened. Additional performance improvements include optimized string building, type stability enhancements, and code simplification.
Key changes:
- Added
pre_plot_sub_componentsoption to control when sub-components are plotted - Refactored string concatenation to use
IOBufferfor better performance - Improved type stability with explicit type annotations
- Simplified nested conditionals and removed redundant code
Reviewed changes
Copilot reviewed 19 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/setup_GUI.jl | Added pre_plot_sub_components parameter and validation logic |
| src/utils_GUI/event_functions.jl | Implemented lazy plotting on expand_all toggle and open functionality |
| src/utils_GUI/topo_axis_utils.jl | Updated plotting logic to respect pre_plot_sub_components setting |
| src/utils_GUI/GUI_utils.jl | Added sub_plots_empty helper and optimized string building with IOBuffer |
| src/utils_GUI/results_axis_utils.jl | Refactored label creation to use IOBuffer |
| src/utils_GUI/info_axis_utils.jl | Converted nested structure printing to use IOBuffer |
| test/test_interactivity.jl | Moved Base.show tests to separate file and added pre_plot_sub_components tests |
| test/test_show.jl | New test file for Base.show functionality |
| test/runtests.jl | Updated includes to use joinpath and added test_show.jl |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Zetison
left a comment
There was a problem hiding this comment.
I went through the review and added some suggestions and rejected others. A final suggestion will be implemented in a separate commit alongside other improvements.
…ription in docstring of the GUI constructor
… plots can directly rely on for visibility
…fixed edge cases for square_intersection.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 25 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Added the option
pre_plot_sub_componentsto theGUI-constructor to skip preplotting hidden sub components of an area (the option is by defaultfalse). The components of anAreaare then plotted on demand (on theopenfunctionality). This greatly enhances performance for large cases. Also improved general performance.