Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Render long lines - #1001

Merged
probablycorey merged 8 commits into
masterfrom
cj-render-long-lines
Oct 21, 2013
Merged

probablycorey merged 8 commits into
masterfrom
cj-render-long-lines

Conversation

@probablycorey

Copy link
Copy Markdown

This fixes two problems based on #979

  1. Chrome doesn't render lines with more than 2^16 chars in a single span.
  2. Moving the cursor on long lines (> 1,000 chars) created a long pause or crashed Atom.

Comment thread src/editor.coffee Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cachedVal is the width of the character right? Maybe charWidth is a better name.

probablycorey pushed a commit that referenced this pull request Oct 21, 2013
Render long lines (without crashing or long pauses)
@probablycorey
probablycorey merged commit 0d49f2a into master Oct 21, 2013
@probablycorey
probablycorey deleted the cj-render-long-lines branch October 21, 2013 22:38
@linquize

Copy link
Copy Markdown

No place to discuss #979

Take a file with 250000 chars in a single line as a benchmark example:
Atom v0.201 32-bit on Win 8 64-bit
Core i5 CPU 3GHz

To load that file, Atom takes 7 seconds, while Notepad++ takes negligible time.
To search a 2-byte pattern that is repeated 10000 times, Atom takes 50 seconds, while Notepad++ takes 5 seconds.
To replace that pattern, Atom did not finish within half an hour, while Notepad++ takes only 5 seconds.

@mehcode

mehcode commented May 22, 2015

Copy link
Copy Markdown
Contributor

@linquize And the atom team is hard at work on it. Have you tried that benchmark on v0.170, v0.180, and v0.190? They've made some great progress recently and even have a tracking issue on it: #6692.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants