coolwanglu / vim.js

JavaScript port of Vim
http://coolwanglu.github.io/vim.js/emterpreter/vim.html
Other
4.45k stars 272 forks source link

Try new version with EMTERPRETIFY to reduce size and startup time #29

Closed emnh closed 9 years ago

emnh commented 9 years ago

See https://blog.mozilla.org/research/2015/02/23/the-emterpreter-run-code-before-it-can-be-parsed/ and https://github.com/kripken/emscripten/wiki/Emterpreter .

coolwanglu commented 9 years ago

Right, I'll probably give a try, but not sure if it will be too slow for actual usage.

coolwanglu commented 9 years ago

Done :) http://coolwanglu.github.io/vim.js/emterpreter/vim.html

The size is much smaller now, and seems that I cannot feel any slowdown.

emnh commented 9 years ago

Excellent :)

coolwanglu commented 9 years ago

@emnh Now I guess I would not worry about size, can you change your PR to the emterpreter branch? Thanks.

emnh commented 9 years ago

There is no emterpreter branch. Did you forget to push it? Or do you mean gh-pages?

coolwanglu commented 9 years ago

Oops. I will push it later. Sorry! 2015-3-4 下午5:51于 "Eivind Magnus Hvidevold" notifications@github.com写道:

There is no emterpreter branch. Did you forget to push it? Or do you mean gh-pages?

— Reply to this email directly or view it on GitHub https://github.com/coolwanglu/vim.js/issues/29#issuecomment-77126149.

coolwanglu commented 9 years ago

Done :)

On Wed, Mar 4, 2015 at 5:53 PM, Lu Wang coolwanglu@gmail.com wrote:

Oops. I will push it later. Sorry! 2015-3-4 下午5:51于 "Eivind Magnus Hvidevold" notifications@github.com写道:

There is no emterpreter branch. Did you forget to push it? Or do you mean gh-pages?

— Reply to this email directly or view it on GitHub https://github.com/coolwanglu/vim.js/issues/29#issuecomment-77126149.

emnh commented 9 years ago

Cool :) . I added a new PR for the emterpreter branch. PS: You may want to merge the non-multibyte fixes for the main branch as well.

emnh commented 9 years ago

I updated my Firefox plugin to use the emterpreter multibyte version if you want to try it.

coolwanglu commented 9 years ago

@emnh Great, I'll add a link in README. By the way, seems that the latest emscripten enabled dynamic growing HEAP by default, which is also supported by the latest Firefox. I guess you can tweak the initial memory size if necessary.