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

web-mode slow down Emacs #230

Closed
jcubic opened this issue Mar 12, 2014 · 6 comments
Closed

web-mode slow down Emacs #230

jcubic opened this issue Mar 12, 2014 · 6 comments

Comments

@jcubic
Copy link

jcubic commented Mar 12, 2014

I don't know what happen but when I open a file (php with ~1.3k lines - it have 3 classes one big and two smaller ones) when I change something like type letter or space it take long to process (maybe 1-2 seconds, even progress indicator show up) on other files it work fine (instant).

It's web-mode because If I swich to php-mode or js-mode it work fine too.

@fxbois
Copy link
Owner

fxbois commented Mar 12, 2014

Is it a php only file ?

@jcubic
Copy link
Author

jcubic commented Mar 12, 2014

yes

@fxbois
Copy link
Owner

fxbois commented Mar 12, 2014

web-mode is not suited for this kind of files. The invalidation process invalidates all the current altered block. When you edit a template, this is ok because you never have huge blocks in a template. By contrast, with a php only script, each time you modify the buffer, the entire buffer is scanned and highlighted.

I advice you to use php-mode for php only scripts

@fxbois fxbois closed this as completed Mar 12, 2014
@jcubic
Copy link
Author

jcubic commented Mar 12, 2014

Ok, too bad because indent in web-mode is right for complex nested closures and php-mode break there.

@jcubic
Copy link
Author

jcubic commented Mar 12, 2014

4 kloc JS file work much faster with web-mode then php

@fxbois
Copy link
Owner

fxbois commented Mar 12, 2014

Strange, if they have the same size, a js file and a php file should be as slow with web-mode

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

2 participants