Skip to content
This repository has been archived by the owner on Oct 17, 2018. It is now read-only.

Update package in preparation for native text buffer #45

Merged
merged 2 commits into from
May 23, 2017

Conversation

maxbrunsfeld
Copy link
Contributor

As part of the performance work in atom/atom#14435, we have decided to drop support for treating lone \rcharacters as line endings. Handling these would have become a bit more complicated with our new text buffer representation, and given how rarely this feature is used, we didn't think it was worth it.

It's possible we'll re-add support for them in the future if people care enough about it that it becomes more important than all of the other performance improvements that we're trying to get done.

In addition, this PR optimizes the detection of which line endings are in use in a given file by taking advantage of the TextBuffer's new async regex search feature. Because we support mixed line endings, detecting a file's line endings requires scanning the entire file. Previously, for a 2MB file, this could take upwards of 50ms. Now it's essentially instantaneous.

* Drop support for legacy \r line endings
* Optimize line ending detection using new async search API
@maxbrunsfeld maxbrunsfeld merged commit 348530c into master May 23, 2017
@maxbrunsfeld maxbrunsfeld deleted the mb-update-for-text-buffer-changes branch May 23, 2017 00:05
This was referenced Jun 14, 2017
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.

1 participant