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

Improve typing performance with word wrapped documents #20

Closed
lkcampbell opened this issue Jun 5, 2013 · 3 comments
Closed

Improve typing performance with word wrapped documents #20

lkcampbell opened this issue Jun 5, 2013 · 3 comments
Assignees

Comments

@lkcampbell
Copy link
Owner

Repro:
Create a fairly long brackets text file and word wrap it. As the word wrapped lines get longer and longer, the ruler gets longer as well. When it get up to 1000 columns long, the typing performance is sluggish. Removing the word wrap makes the type speed faster.

Expected behavior: The typing performance should stay the same whether the document is word wrapped or not.

Proposed solution: In the current code base, the ruler length is based on the longest line length in the document. When word wrap is on, the ruler length should be based on the width of the main editor frame. This will fix this problem in three ways:

First, the ruler will be shorter, which will make the code that updates the ruler length perform better.

Second, the ruler length will be updated on editor resize instead of text change, taking the pressure off of the typing.

Third, I can get rid of the weird word wrap flip workaround I had to use because CodeMirror doesn't define the longest line length in word wrap mode. This workaround is the most likely culprit for the performance problems.

Other Notes:
The fix for this issue depends upon the merging of pull request #4152.

@mignz
Copy link

mignz commented Jun 11, 2013

When will we be seeing this performance update? This is really noticeable in some cases.

@lkcampbell
Copy link
Owner Author

Assuming the pull request I submitted to the core code (see Other Notes above) is merged this week, I will be working on the fix this weekend. Since the fix relies on the new core merge, if you want to use the ruler immediately, you will also have to be using the latest dev version of Brackets. The required Sprint for this extension will be going up to 27.

@lkcampbell
Copy link
Owner Author

Just an FYI, I tested some fairly long text lines (3000 - 4000 characters) for this fix. Typing on word wrapped documents with really long text lines is still a bit sluggish, with or without this extension installed. The point is, the ruler should no longer be slowing down the typing speed more than it already is. The typing speed should be the same with and without the extension.

@lkcampbell lkcampbell self-assigned this Apr 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants