Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CodeEditApp/CodeEditTextView
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.11.7
Choose a base ref
...
head repository: CodeEditApp/CodeEditTextView
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.12.0
Choose a head ref
  • 1 commit
  • 14 files changed
  • 1 contributor

Commits on Jul 23, 2025

  1. Layout Invalidation Performance (#118)

    ### Description
    
    Made the layout manager *move* lines that weren't invalidated instead of re-typesetting them. Also made the reuse queue just make views tiny and hide them instead of removing them from the view hierarchy, and queue more views.
    
    After these changes, layout in the source editor goes from taking up *36% of the CPU* time while editing, to taking up **5% of main thread CPU time**.
    
    - Added a new debug mode for visualizing line fragment invalidation.
    - Adjusted the layout pass to avoid typesetting lines that don't need layout.
      - Made a distinction between 'forced layout' via `setNeedsLayout` and 'continued' layout where a line previously scanned in the layout pass was updated.
      - Due to that, I was able to check if a line fragment actually needed typesetting or just potentially needed to have it's position adjusted.
      - Added a new method to update a line's view's positions during layout.
    - Removed the unnecessary `lineRange` variable on the `LineFragment` class.
    - Adjusted the use of `documentRange` on the `LineFragment` class. It's now updated during layout, simplifying various methods.
    
    ### Related Issues
    
    * N/A
    
    ### Checklist
    
    - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
    - [x] The issues this PR addresses are related to each other
    - [x] My changes generate no new warnings
    - [x] My code builds and runs on my machine
    - [x] My changes are all related to the related issue above
    - [x] I documented my code
    
    ### Screenshots
    
    Before:
    
    https://github.com/user-attachments/assets/05027712-5690-4970-b1ab-e0b4fe9553ec
    
    After:
    
    https://github.com/user-attachments/assets/36350ea1-66d8-43d0-a676-1bb770a733d7
    thecoolwinter authored Jul 23, 2025
    Configuration menu
    Copy the full SHA
    e7f1580 View commit details
    Browse the repository at this point in the history
Loading