Skip to content

Improve performance#38

Merged
Zetison merged 8 commits intomainfrom
enhance/performance
Nov 24, 2025
Merged

Improve performance#38
Zetison merged 8 commits intomainfrom
enhance/performance

Conversation

@Zetison
Copy link
Collaborator

@Zetison Zetison commented Nov 21, 2025

Added the option pre_plot_sub_components to the GUI-constructor to skip preplotting hidden sub components of an area (the option is by default false). The components of an Area are then plotted on demand (on the open functionality). This greatly enhances performance for large cases. Also improved general performance.

…ip preplotting hidden sub components of an area (the option is by default alse). Also improved general performance.
@Zetison Zetison requested a review from Copilot November 21, 2025 18:41
@Zetison Zetison self-assigned this Nov 21, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_components option to control when sub-components are plotted
  • Refactored string concatenation to use IOBuffer for 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>
Copy link
Collaborator Author

@Zetison Zetison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Zetison Zetison requested a review from Copilot November 22, 2025 18:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Zetison Zetison requested a review from dqpinel November 22, 2025 19:54
@Zetison Zetison merged commit c948366 into main Nov 24, 2025
3 checks passed
@Zetison Zetison deleted the enhance/performance branch November 24, 2025 11:20
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.

3 participants