Commit b43390a
* Phase 5: Add IsFixed and RequiresTargetLayout categorization properties
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Further simplify DimAuto.Calculate using IsFixed property
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Refactor for-loops to foreach and clarify DimFill logic
Refactored multiple for-loops iterating over view lists to use foreach loops for improved readability and reduced boilerplate. Removed unused variables such as viewsNeedingLayout and index counters. Clarified DimFill handling by continuing early if the DimFill is not valid or lacks a To property, reducing nesting and improving intent. Made minor formatting and code style improvements for consistency.
* Refactor subview filtering and sizing logic
Refactored repeated LINQ queries for subview filtering into reusable helper methods (`GetViewsThatMatch`, `GetViewsThatHavePos<TPos>`, `GetViewsThatHaveDim<TDim>`), reducing duplication and improving readability. Moved max content size calculations for various subview types into new helper methods (`GetMaxSizePos<TPos>`, `GetMaxSizeDim<TDim>`). Updated main logic to use these helpers. Adornment thickness calculation now uses a switch expression. These changes improve modularity and maintainability.
* Refactor subview categorization for layout calculation
Refactored layout calculation to use a single-pass CategorizeSubViews method, grouping subviews by relevant Pos/Dim types into a new CategorizedViews struct. This replaces multiple helper methods and reduces redundant iterations. Updated main logic to use these categorized lists, and unified size calculation helpers to further reduce code duplication. Improves performance and maintainability by consolidating subview processing and removing obsolete methods.
* Revert perf POC commits and add missing overrides to Combine types
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Add helper methods and simplify DimAuto.Calculate with foreach loops
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Refactor layout calculation in DimAuto.cs
Removed commented-out code and unnecessary list declarations to clean up the layout calculation logic.
* removed old plan file
* Code cleanup
* Add performance analysis and improvement plan for DimAuto.Calculate
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Add DimAuto benchmarks and benchmark documentation
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Implement Phase 1 & 2 performance optimizations for DimAuto.Calculate
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Code cleanup
* Delete plans/dimauto-perf-plan.md
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tig <585482+tig@users.noreply.github.com>
Co-authored-by: Tig <tig@users.noreply.github.com>
1 parent e9976da commit b43390a
File tree
16 files changed
+754
-270
lines changed- Terminal.Gui/ViewBase/Layout
- Tests
- Benchmarks
- Layout
- UnitTestsParallelizable/ViewBase/Layout
- docfx/docs
16 files changed
+754
-270
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
488 | 526 | | |
489 | 527 | | |
490 | 528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
0 commit comments