adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.25k stars 7.63k forks source link

Sprint 30 hangs when typing #5052

Closed doubletaketech closed 11 years ago

doubletaketech commented 11 years ago

Periodically, as soon as I start typing anything Brackets Sprint 30 freezes and I can't do anything. I did not see this in previous updates. I'm on OSX 10.7.5 . Restarting Brackets doesn't even help. Then, it randomly decides to start working again. Very strange.

Wish I had more details, but just thought I'd let you know.

Don

doubletaketech commented 11 years ago

looks like codeassist/autocomplete is just taking way too long and making Brackets unusable. Anyway to disable it until this performance bug is resolved? I don't see a setting to turn it off?

doubletaketech commented 11 years ago

It only hangs when typing in script. html and css are fine. It hands well before this dropdown appears ... see attached. screen shot 2013-09-05 at 9 30 41 am

redmunds commented 11 years ago

@doubletaketech There is (what should be) a one-time lag when you first open Brackets when the JS hint engine is parsing files and build data tables. So, restarting Brackets might make it worse. After it "starts working again" are there any further lags, or just one (big) lag?

Also, the size of the initial lag is proportional to the size and complexity of your project. How many files/bytes is your project?

doubletaketech commented 11 years ago

Basically, I have to wait every time and it is rare that it actually responds right away. I could have brackets open for hours and it still lags.

3 MB, one index.html with JQuery, Bootstrap and other smaller libraries. I would not consider it complex, maybe 500 lines of JS code.

Does it matter if the JS in inside the same page or external file? I can move some of the code into separate external files if that will help.

I really love Brackets with Live and with Theseus, so I hope there are ways to optimize JS hint performance or turn it off.

Thanks Don

redmunds commented 11 years ago

Also, please uninstall all extensions and let me know if problem persists. Thanks.

doubletaketech commented 11 years ago

Tried that already a few times. No impact.

redmunds commented 11 years ago

Sounds like a lag was introduced in Sprint 30 -- we'll take a look.

njx commented 11 years ago

There's a known issue with code hint lagginess while editing JS in <script> tags inside an HTML file (#4608). Does that match your case? Do you see the same slowdown when editing in a pure .js file?

To temporarily disable code hints, you can move the www/extensions/default/JavaScriptCodeHints folder out somewhere else and restart Brackets. The www folder is next to the Brackets executable on Windows; on Mac, you have to do "Show Package Contents" on Brackets.app and look in the Contents folder inside that.

doubletaketech commented 11 years ago

Yes, this matches my case. I will try it in js file. I can just move my scripts outside the html, if that is a good workaround.

Appreciate the feedback.

Don

RaymondLim commented 11 years ago

Instead of disabling JS code hinting, you can also selectively exclude some files or directories with a configuration file called ".jscodehints". You can look at this wiki https://github.com/adobe/brackets/wiki/JavaScript-Code-Hints#configuration regarding the config file. See whether using the config file fixes the issue for you.

doubletaketech commented 11 years ago

much better in external js file. :) I will close this for now assuming the html page issue is being worked.

Thanks!

lazarev commented 11 years ago

I've got the same issue on sprint 30 and sprint 31. While disabling hints totally is worse variant of both I can't implement precise selection of file types to disable hinting. Can anybody please help me with finding exact place where should I place this . jscodehints file? I just can't find it in documentation :\

RaymondLim commented 11 years ago

@lazarev You put it in your project root directory.