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

Very slow for large files #1

Open
ColdGrub1384 opened this issue Jun 1, 2019 · 7 comments
Open

Very slow for large files #1

ColdGrub1384 opened this issue Jun 1, 2019 · 7 comments

Comments

@ColdGrub1384
Copy link

I open this issue here because the SourceEditor repo is inactive. When editing large files, my app takes a lot of time to highlight code typed in the text view, it blocks the main thread so it's very hard to type. On my iPhone 7, the app is slow for files with 300+ lines and for 1000+ lines, it's very unusable. On my iPad 6th gen, it begins to be slow for files with 700+ lines.

@ColdGrub1384
Copy link
Author

Would it be a way to not block the main thread?

@twostraws
Copy link
Owner

I know it's slow for large files, but that doesn't affect how I'm using it. You're welcome to open a pull request with changes that make it more efficient, but I'm not sure that moving a very old issue from one repository to another is likely to get anything done.

@ColdGrub1384
Copy link
Author

Ok. I will try to fix it and submit a PR.

@NeomMob
Copy link

NeomMob commented Jun 19, 2019

@ColdGrub1384 , did you fina a way to improve this situation? I also saw that the speed can be seriously impacted by the number and the type of regular expressions used for the highlighting

@nathfreder
Copy link

nathfreder commented Jul 5, 2019

@NeomMob I'm not sure if this is relevant, but VSCode's editor stops parsing after a certain amount of lines. Maybe that could be used here?

EDIT
VSCode stops parsing after 20MB or 300K lines

@NeomMob
Copy link

NeomMob commented Jul 15, 2019

@nathfreder Thanks for your suggestion. We are not talking about this amount of lines. Here we can feel some speed issue after 1000 lines which is not that much/

@varkrishna
Copy link

@NeomMob I'm not sure if this is relevant, but VSCode's editor stops parsing after a certain amount of lines. Maybe that could be used here?

EDIT VSCode stops parsing after 20MB or 300K lines

I am having a JSON of 5 MB Somehow VS Code handling it very efficiently. Not Sure what they are doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants