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

Javascript mode crash opening 6380 loc javascript file #1011

Open
codygman opened this issue Jul 30, 2017 · 5 comments
Open

Javascript mode crash opening 6380 loc javascript file #1011

codygman opened this issue Jul 30, 2017 · 5 comments

Comments

@codygman
Copy link

codygman commented Jul 30, 2017

Using Yi (33306ea) and javascript-mode on a very large javascript file from react:

https://github.com/facebook/react/blob/e35724a03d66bb73dbbec4dc4b12a5170bfe2615/src/__mocks__/vendor/third_party/WebComponents.js

I opened the file in vty mode with vim keybindings and then tried to go to the end of the file with G in vim mode. It consumed all of my memory and I had to reboot my system.

@codygman
Copy link
Author

Added specific commit of Yi I was using.

@codygman
Copy link
Author

Could very well be related to #105.

@noughtmare
Copy link
Member

From the author of the mode #143 (comment). It seems yi-mode-javascript is abandoned. I think the best option to solve this is to make a fastMode equivalent that just uses the lexer to do the highlighting.

@codygman
Copy link
Author

@noughtmare Alright, thanks for the direction. I was using the Javascript mode to see how Yi fared for incremental parsing on large files. #105 leads me to believe that until that issue the leak issue is fixed there will be performance issues.

@noughtmare
Copy link
Member

noughtmare commented Jul 30, 2017

@codygman A fastMode would only use the lexer and therefore bypass the whole incremental parser.

But the performance problems in the javascript mode are much more severe than for example in the haskell mode. So I think improvement is still possible.

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