Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Noticeable lag in typing performance between release 43 and 44 #9486

Closed
orichards opened this issue Oct 8, 2014 · 66 comments
Closed

Noticeable lag in typing performance between release 43 and 44 #9486

orichards opened this issue Oct 8, 2014 · 66 comments

Comments

@orichards
Copy link

It seems that latest brackets version (44) adds split view, but makes working in editor nearly impossible. There is visible lag between key press and character display.

Version 43 used to work like a charm, and it was the fastest editor based on JS technologies (compared to Atom and Light table).

OSX: 10.9.4
MacBook Pro Retina 13
Memory: 8GB

@kylelondonuk
Copy link

I also have this issue with version 44 and a June 2012 Retina MacBook Pro running OS X 10.9.5 with 16GB RAM.

@szmarci
Copy link

szmarci commented Oct 8, 2014

yes it is very laggy for me as well. atom now seems like it is lightning fast.
OSX: 10.9.3
iMac 7,1
Memory: 6GB

@JeffryBooher
Copy link
Contributor

Can you all try restarting without extensions to see if that helps any?

@szmarci
Copy link

szmarci commented Oct 8, 2014

for me no, it is not helping. also the live preview highlight is slightly off of the element:
screen shot 2014-10-08 at 13 43 47

@redmunds
Copy link
Contributor

redmunds commented Oct 8, 2014

@szmarci I think the Live Preview Highlight being off is captured in #7921. Please add your comments there.

@kylelondonuk
Copy link

No that doesnt help me JeffryBooher - i dont have any extensions installed but restarting without them also doesnt make a difference.

@redmunds
Copy link
Contributor

redmunds commented Oct 8, 2014

Thanks for your feedback. We need to isolate slowdown to particular area(s) such as:

  • Startup
  • Opening a file
  • Changing files
  • Changing projects
  • Typing
  • Any other particular edit operation
  • Anything else?

A detailed recipe is very helpful. For example, when "opening a file" there are different cases of the Document already being opened (or not) in memory, so we need to figure out exactly where the slowdown is.

Note: when opening a project (which is done during startup), with a single pane Brackets loads the list of files into the working set, but it only reads 1 file from disk (the one being shown in editor). Each subsequent file is read from disk the first time it's shown in editor. Now that Brackets supports showing 2 files at once, there is an inherent slowdown due to reading 2 files from disk when opening a project which was last used with 2 panes.

@pthiess
Copy link
Contributor

pthiess commented Oct 8, 2014

@redmunds Boosting visibility on this issue setting the 1.0 milestone.

@kylelondonuk
Copy link

Hi redmunds,

For me, the slowless is just for user input (so typing basically). There's a noticeable lag when I am typing any language (JS, CSS, HTML, PHP).

Switching between files using the project list on the list is also slower (there's a pause before the file appears on the right that seems longer than before), but as you said that may be due to the enhanced split screen feature (although I'm not using any split screen options myself).

@redmunds
Copy link
Contributor

redmunds commented Oct 8, 2014

@kylelondonuk Thanks for your details.

Is anyone seeing slower typing who is not on Mac Retina?

@redmunds
Copy link
Contributor

redmunds commented Oct 8, 2014

@njx Are you noticing a slowdown of typing on Mac Retina with 0.44? I'm not seeing a noticeable difference on OSX 10.8

@njx
Copy link

njx commented Oct 8, 2014

I haven't noticed any particular sluggishness in typing. If I mash the keyboard in an ordinary text document, it seems to keep up. (In a JS file, the code hints cause small pauses, but it feels about the same to me as in previous builds.) I don't have 0.43 installed to compare it to, though.

However, I agree with @kylelondonuk that file switching is noticeably slower - I filed #9439 on this. It seems to be related to greater amounts of style invalidation/recalculation in the new working set implementation.

@redmunds
Copy link
Contributor

redmunds commented Oct 8, 2014

@kylelondonuk Questions about the typing slowdown you are seeing:

  • Do you have any extensions installed? You can use Debug > Reload Without Extensions to quickly test without extensions
  • Does it matter if Word Wrap is on or off?
  • Have you changed any other preferences from their default values that could be affecting this?
  • Let us know if you notice any other patterns of when it does/doesn't happen

@kylelondonuk
Copy link

Hi,

No extensions installed, and word wrap can be on or off, makes no difference.

I don't think i've touched preferences ever (today was the first time i discovered I could disable word wrap, in fact!).

It just seems to be all the time, no starting/stopping of the lag.

@orichards
Copy link
Author

Hi,

For me it is the same: typing is impossible. Even with autocompletion off it works much slower than 43. I've also noticed one interesting thing: split chooser icon is blinking. It seems that it constantly re-renders itself.

Tried Brackets-44 on my non-retina macbook air 11 (mid 2013, OSX 10.8.5). It works better: there is no icon blink, but still noticeable lag (lag is lower than on retina) between typing and character display, scrolling speed is also far ideal (not smooth) like it was on 43.

@pbastowski
Copy link

I am on a MacBook Air 13 inch with 4gb memory, late 2010 model (Core 2 duo) running on Mavericks 10.9.5. Brackets 44 is much slower than 43. Switching between files takes less than 1 second on 43 and more than 2 seconds on 44. Version 44 is completely unusable on my old macbook air with extensions loaded. Without extensions loaded, version 44 is almost as fast as version 43 with extensions.

@njx
Copy link

njx commented Oct 8, 2014

That icon blink sounds worrisome. @JeffryBooher Could that be a sign that the split view stuff is doing some work when it shouldn't?

@JeffryBooher
Copy link
Contributor

@orichards can you reset your cache and let me know if that fixes it? It shouldn't try re-render itself. Not sure what's going on there. https://github.com/adobe/brackets/wiki/Cache-Folder

@unyo
Copy link

unyo commented Oct 8, 2014

my project is going super slow as well. is anyone else here who is experiencing lag using the exclude-folders extension?

@redmunds
Copy link
Contributor

redmunds commented Oct 9, 2014

@unyo If you have isolated a slowdown to the exclude-folders extension, then please open a separate issue. Be sure to provide the regexp you are using in that extension -- I suspect it could be an inefficient regexp.

@larz0
Copy link
Member

larz0 commented Oct 9, 2014

(Here's the icon blink issue, #9377.)

@JeffryBooher
Copy link
Contributor

Removing Milestone until we know more

@ilkkanisula
Copy link

I experience bad lag in brackets when typing and moving inside code window after I updated to release 44. Restarting without extensions didn't help with performance. I have OSX 10.7.5 on 2008 Macbook (white) with 4GB ram and hybrid SSD+HDD. Brackets has been running nicely from 32-43. It's so bad that I'm suggesting brackets development team to develop means for measuring performance bottlenecks in 43 and compare them to 44 before adding more features into brackets soup.

@JeffryBooher
Copy link
Contributor

@unyo we have a fix coming for the switching files performance issue (#9439). Would you be willing to test a 1-off version of Brackets which is somewhere between 0.43 and 0.44? This would only help us confirm where the issue might be.

@kylelondonuk
Copy link

@JeffryBooher I emailed you at your Github listed email address. Cheers!

@JeffryBooher
Copy link
Contributor

We have a very early test build of Release 0.45 which we have heard fixes the performance issues. This build has a new version of codemirror, some bug fixes and late 0.44 translations but, most importantly, it fixes the performance when opening files from the working set. We're still testing this build and 0.45 is far from being done but we think it's stable enough to test and we'd like to get the build in front of folks who can help measure performance.

The installer can be downloaded from https://github.com/adobe/brackets/releases/tag/test-45. Share your experience with this build if you can. We'd love to get more feedback. Thanks!

@kylelondonuk
Copy link

This test-45 build fixes the typing lag for me.

@PatrickGriffiths
Copy link

The same thing was happening to me even in the stable 43 build... I will look into updating to that 45 build for a fix as @kylelondonuk said it fixed it for him

@PatrickGriffiths
Copy link

It didn't fix with the update for me at all...

@designcise
Copy link

Just installed 45. The issue is still there. There is still some lag when switching between files:

In the "Working Files" area it's only apparent when switching between previously opened tabs which at first appear to open slowly, but once (I'm assuming they're cached) they open/switch between a lot quicker.

In the "Folder Tree" area it's still has some lag, but it certainly seems a bit improved from 44.

@redmunds
Copy link
Contributor

@PatrickGriffiths @designcise At startup when you have some files in one or both of the working sets, Brackets only reads the file(s) from disk that are displayed in one or both panes. The other files in the working set get read from disk as needed. This is so Brackets starts up faster. Brackets has always done this, so it's not fair to include this delay as being different from the previous release.

So, for the sake of isolating new slowdowns introduced for 44, please select each file in your working set one at a time first so all files are read from disk, and then test how long it takes to switch between files. Using this recipe (in both 43 and 44), is switching between files still slower?

@designcise
Copy link

@redmunds Once the files are selected (or read) at least once in the working files area, they are indeed faster. I've actually been able to test this while working on a project where I switch between 10-15 open files. I'm unable to test this in 43, but as far as I remember, things were generally faster.

What about the folder tree area, it has a considerable lag switching between different files. I understand this could be because the files take time to be read, but I believe it would be a tad bit less annoying/frustrating if the file names were at least selected in the left pane immediately, and maybe a spinning icon would replace the mouse cursor or something while the page loads. In this way, the left pane would at least seem a bit more responsive, no?

@designcise
Copy link

@redmunds Another thing I discovered is that, in v45 loading brackets without extensions, switching between files becomes a bit faster.

@PatrickGriffiths
Copy link

@redmunds I did try what you suggested there, but I am more concerned about the delay in clicking a line within a single document or simply moving down a line with the arrow key, or typing... They all result in the same issues within a single view panel and switching files does take a little time, but I wouldn't mind if it were just that, working within one document is almost unbearable for me right now, which is a shame as I loved working with Brackets before this problem.

@designcise
Copy link

@PatrickGriffiths did you try loading brackets without extensions (Debug > Reload Without Extensions)? It would help them diagnose the problem better.

@szmarci
Copy link

szmarci commented Oct 13, 2014

I have also tried v45, typing is much faster. if I have to rank them by performance, it would be:

  1. v44 with hidden sidebar (it is not the best but it is fine)
  2. v45 with hidden or shown sidebar (speed is okay here too, although I didn't notice any difference with or without sidebar)
  3. v44 with sidebar (it is not usable in this state)

first and second are pretty close, might be just placebo effect.

@JeffryBooher
Copy link
Contributor

@PatrickGriffiths try setting the codehint.JSHints preference to false and reload without extensions to see if that makes a difference. Since you were experiencing a performance problem in 0.43 then it's likely that there is something causing the problem and that wouldn't have been addressed in the early build of 0.45.

@redmunds
Copy link
Contributor

@designcise

What about the folder tree area, it has a considerable lag switching between different files...

Please open a separate issue on this. Your suggested solution sounds reasonable.

...loading brackets without extensions, switching between files becomes a bit faster.

Let us know if you can identify exactly which extension is causing the slowdown.

@designcise
Copy link

@redmunds I'm only using the code folding extension. I did an entire system format, and installed .45; tried without extension, and there was a slight delay in switching between files -- slower compared to .43 and earlier versions. After installing the extension it was only a tad bit slower.

@dangoor
Copy link
Contributor

dangoor commented Oct 14, 2014

I've just been poking around in the timeline comparing 0.43 with 0.44 and master while mashing the keys. There are a few things that occur when you're typing that cause whole document layouts and I noticed that in 0.44 those layout events took longer than in 0.43 or master (92e5452).

Additionally, the browser was doing a lot more painting in 0.44. There were frequent sets of repaints of the toolbar, the sidebar shadows, and each individual gutter and codemirror line. This sequence would end with a pair of paints:

  1. the split view button
  2. the whole window

I didn't see that pair of paints in 0.43 or master and those alone account for 4-6ms (which doesn't sound like much but if your ideal budget is 16.67ms, that's a lot!). I think the long line of paints may be the bigger issue though.

On master, there were far fewer paint events going on while typing (just a part of the editor area and the status bar region with the cursor position).

I bisected to find the first good commit and it was: 3985316.

@unyo
Copy link

unyo commented Oct 14, 2014

@JeffryBooher I just installed tag test-45 DMG on OSX, the typing lag seems to have disappeared. Thanks so much! Can't wait to see this in 0.45 - the split screen functionality makes brackets much more pleasant to use.

As far as the switching files lag goes, it's not really noticeable with test-45 (I can't tell if it's any slower than 0.43, which I just upgraded from). I think the typing lag issue might have been compounding the switch files lag. Additionally I have the indent guide extension - something I noticed with 0.44 that caused file switching to appear just a tiny bit slower. When I reload test-45 with no extensions, there is no file switch lag at all.

@ParishKhan
Copy link

Brackets is lagging too much comparing to other IDE like sublime text. I love brackets but hate this issue. I know that bracket is made with JavaScript that's why it's showing this performance issue. Recently i have heared about the google's v8 engine which runs JavaScript much faster. is it possible to add v8 engine in bracket?

@abose
Copy link
Contributor

abose commented Feb 10, 2016

Brackets is already based on google's v8.
Could you point out the exact points/use cases where brackets lags?

@proto-typical
Copy link

There is definitely a lag problem, and I have pinpointed that it's directly related to the size of the file you are editing and codehint.JSHints flag set to true. If I start a new file or open one with just 10 lines, there is no lag whatsoever. But working with a file of 2500 lines, it's a horrific lag.

Obviously a workaround is breaking my project down into smaller files, however I think many users would choose to just use a editor that doesn't lag on a 102k text based file.

Let me know if you need more information, I am experiencing this on a Macbook Pro with OSX 10.11.4 (El Capitan) 16GB i5 SSD and version 1.6 of Brackets, no extensions running.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests