Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm is terribly slow when editing HTML / CSS / JS

PyCharm becomes nearly unresponsive in 5 minutes of editing HTML / CSS / JS code – even typing a single character causes a several seconds lag.

However, everything is absolutely fine when I work with Python. I don't close PyCharm for days and it works smooth.

Restarting PyCharm helps only for a few minutes. I'm on PyCharm 5.0.5 Professional & OS X 10.11.

like image 248
Max Malysh Avatar asked Dec 14 '16 23:12

Max Malysh


People also ask

Is PyCharm good for HTML and CSS?

HTML and CSS are well supported in PyCharm Editor. PyCharm Editor includes a special shorthand and provides tag completion for HTML.

Is PyCharm good for HTML?

PyCharm brings powerful support for HTML that includes syntax and error highlighting, formatting according to the code style, structure validation, code completion, on-the-fly preview during a debugging session (Live Edit) or in the dedicated preview tab in the code editor, and much more.

Can you run JavaScript in PyCharm?

With PyCharm, you can develop modern web, mobile, and desktop applications with JavaScript and Node. js. PyCharm also supports React, Angular, Vue. js, and other frameworks and provides tight integration with various tools for web development.

Why is HTML slow?

Slow loading webpages may happen for a number of reasons. Sometimes it can be difficult to find the exact cause. Poor loading speeds may be caused by slow hosting, bloaty or poorly made scripts, too many or too large images, missing elements, or errors in the css or html code.


1 Answers

There are two solutions:

  1. You can disable HTML / CSS / JS inspections in Preferences -> Editor -> Inspections.
  2. If your project has a decent amount of third-party libraries (jquery, bootstrap etc.), this might be the reason. Don't index directories with these libraries: right click on a folder and then choose Mark Directory As -> Excluded.

Don't forget to clear the cache: File -> Invalidate Caches / Restart.

like image 196
Max Malysh Avatar answered Oct 24 '22 00:10

Max Malysh