Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to reflow performance by removing O(n^2) behavior #3045

Merged
merged 3 commits into from
Jan 18, 2024

Commits on Dec 30, 2023

  1. refactor: Simplify transfer_rows_from_viewport_to_lines_above

    next_lines is always consolidated to a single Row, which immediately
    gets removed - we can remove some dead code as a result
    aidanhs committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    2ed84e3 View commit details
    Browse the repository at this point in the history
  2. perf: Batch remove rows from the viewport for performance

    Given a 1MB line catted into the terminal, a toggle-fullscreen +
    toggle-fullscreen + close-pane + `run true` goes from ~9s to ~3s
    aidanhs committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    c1d8b5d View commit details
    Browse the repository at this point in the history
  3. perf: Optimize Row::drain_until by splitting chars in one step

    Given a 10MB line catted into the terminal, a toggle-fullscreen +
    toggle-fullscreen + close-pane + `run true` goes from ~23s to ~20s
    aidanhs committed Dec 30, 2023
    Configuration menu
    Copy the full SHA
    78fafb1 View commit details
    Browse the repository at this point in the history