Skip to content

🐞 Editor lags while resizing #119

Closed

Description

@Wouter01

Description

When resizing the editor, the whole app will lag quite a bit.
I've had a look and the culprit seems to be the rulerview:

rulerView = STLineNumberRulerView(textView: textView, scrollView: scrollView)

When this is commented out, everything is (mostly) smooth.

Another thing I noticed is that if textView.widthTracksTextView is set to false, it's also smoother.

To Reproduce

  1. Open editor with file
  2. Resize the window

Expected behavior

Resize is smooth

Version information

CodeEdit: [e.g. 1.0]
macOS: [e.g. 13.1]
Xcode: [e.g. 14.2]

Additional context

No response

Activity

  1. thecoolwinter commented on Jan 18, 2023

    @thecoolwinter
    Collaborator

    After some investigation, we’ll need to roll our own ruler view that doesn’t re-draw every line every time it’s invalidated. We should be able to only draw visible line numbers. That will help with the lag the ruler view is causing.

    We still need to look into the lag being caused by the text view itself further.

  2. thecoolwinter commented on Feb 10, 2023

    @thecoolwinter
    Collaborator

    Fixed with #138

  3. moved this from 🆕 New to 🏁 Complete in CodeEdit Projecton Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions