Use new text-buffer version with a more efficient DisplayLayer #13453

Merged
merged 27 commits into from Dec 16, 2016

Projects

None yet

6 participants

@maxbrunsfeld
Contributor
maxbrunsfeld commented Dec 14, 2016 edited

Depends on atom/text-buffer#185. See that PR for a more thorough description.

Fixes #8864
Fixes #12391

This removes some restrictions that we previously enforced when editing large files; you can now use folds and soft wraps. The only feature that remains disabled for > 10MB files is syntax highlighting.

Large files also now open somewhat faster. Here are some benchmark results from Circle CI before and after this PR:

benchmarks

There are lot of noise in these results of course, but opening a 10MB file is consistently ~200ms faster.

nathansobo and others added some commits Dec 1, 2016
@nathansobo @as-cii nathansobo Use position translation to detect soft wraps when rendering line nums
Signed-off-by: Antonio Scandurra <as-cii@github.com>
20088cf
@maxbrunsfeld maxbrunsfeld Enable soft wraps and folds in large file mode
3cb64a9
@nathansobo @maxbrunsfeld nathansobo Use new boundary methods for moving lines up/down
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
8a8819b
@maxbrunsfeld @nathansobo maxbrunsfeld Update test to reflect new soft wrap indent clipping behavior
Signed-off-by: Nathan Sobo <nathan@github.com>
65edebd
@nathansobo nathansobo Constrain the followingRow to the line count in moveLineDown 5e8c3c7
@nathansobo nathansobo Adjust spec now that tab length does not affect leading space tokens
8b18106
@maxbrunsfeld @nathansobo maxbrunsfeld Clip screen range end backward when dragging gutter
Signed-off-by: Nathan Sobo <nathan@github.com>
e339aab
@maxbrunsfeld @nathansobo maxbrunsfeld Expect a single leading whitespace token w/ atomic soft tabs & indent…
… guides disabled

Signed-off-by: Nathan Sobo <nathan@github.com>
4f7b9e0
@maxbrunsfeld @nathansobo maxbrunsfeld Adjust assertion now that paired characters aren't wrapped in spans
Signed-off-by: Nathan Sobo <nathan@github.com>
8afeae4
@maxbrunsfeld maxbrunsfeld ⬆️ text-buffer (prerelease)
4388ecb
@maxbrunsfeld maxbrunsfeld Merge remote-tracking branch 'origin/master' into mb-ns-integrate-new…
…-display-layer
d7b86d9
@maxbrunsfeld maxbrunsfeld ⬆️ text-buffer (prerelease)
e526e75
@maxbrunsfeld maxbrunsfeld ⬆️ spell-check 19f77e8
@maxbrunsfeld maxbrunsfeld ⬆️ text-buffer (prerelease)
9a8ef15
@maxbrunsfeld maxbrunsfeld Adjust LinesYardstick assertion to reflect removal of redundant leadi…
…ng whitespace span
a06d777
@maxbrunsfeld maxbrunsfeld Remove unnecessary comparisons to current params in TextEditor.update
Now the DisplayLayer internally avoids unnecessary work when reset() is
called with its existing parameters.
39302ae
@maxbrunsfeld maxbrunsfeld Avoid temporarily clearing DisplayLayer params in TextEditor.copy 34c8e25
@maxbrunsfeld maxbrunsfeld ⬆️ text-buffer (prerelease)
571fa3f
@maxbrunsfeld maxbrunsfeld ⬆️ text-buffer (prerelease)
e32e07a
package.json
@@ -65,7 +65,7 @@
"sinon": "1.17.4",
"source-map-support": "^0.3.2",
"temp": "0.8.1",
- "text-buffer": "9.4.3",
+ "text-buffer": "v10.0.0-4",
@50Wliu
50Wliu Dec 15, 2016 Member

This should be 10.0.0-4 to be consistent, right?

@maxbrunsfeld
maxbrunsfeld Dec 15, 2016 Contributor

Oh yeah, thanks. I'll fix this when I bump it to 10.0.0.

maxbrunsfeld and others added some commits Dec 15, 2016
@maxbrunsfeld maxbrunsfeld ⬆️ find-and-replace
To remove dependency on old Patch
34b11a1
@maxbrunsfeld maxbrunsfeld ⬆️ text-buffer (prerelease)
abbe836
@maxbrunsfeld maxbrunsfeld ⬆️ text-buffer
d0e8eca
@maxbrunsfeld maxbrunsfeld ⬆️ text-buffer
4edd606
@nathansobo nathansobo ⬆️ autosave
1c9d2e6
@maxbrunsfeld maxbrunsfeld ⬆️ whitespace
7cc84c4
@maxbrunsfeld maxbrunsfeld ⬆️ spell-check
72cd3f9
@Ben3eeE
Member
Ben3eeE commented Dec 16, 2016

Really loving this 🐎 😻 will test it out more with the new spell-check and whitespace changes tonight(Late American morning). But don't wait for me if you want to go ahead and :shipit:

@ungb @maxbrunsfeld Want to drop #11690 here since it is an uncaught that reproduces with large files. We don't have a file to repro or any steps other than open a large file but I believe it can be worth some 👀 given these changes.

@maxbrunsfeld maxbrunsfeld Increase default file size for large-file warning
4a12354
@maxbrunsfeld maxbrunsfeld merged commit 2095015 into master Dec 16, 2016

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@maxbrunsfeld maxbrunsfeld deleted the mb-ns-integrate-new-display-layer branch Dec 16, 2016
@maxbrunsfeld
Contributor

@Ben3eeE I believe #11690 is due to a separate limitation: we store the entire contents of a file in JavaScript string, and strings have a hard limit on their lengths. This PR does not fix that issue.

@Stanzilla

@maxbrunsfeld This changes nothing for #1667, right?

@maxbrunsfeld
Contributor

This changes nothing for #1667, right?

Right. It does not address that issue.

@alexandernst

@maxbrunsfeld Is there an issue which we can track for ast parsing/syntax highlight? Where can we expect such a feature to be ready?

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