adobe / brackets

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

WIN: UI shakes and flickers a lot when resizing Brackets window by dragging #4841

Open dalcala opened 11 years ago

dalcala commented 11 years ago

Description: On Windows, the UI shakes & flickers a lot when you resize the Brackets window by dragging the top edge or the left edge of the Brackets window. The problem is much less noticeable when dragging the bottom edge or right edge. It's really noticeable if you have multiple inline color editors open. I tried making a Jing screen capture video, but the jiggle isn't picked up in the video. Maybe related to https://github.com/adobe/brackets/issues/1741?

keywords: jumpy, choppy, jiggles, jumps

Repro using Brackets Sprint 29 on Win 7. UTR on Mac 10.8.

Repro steps:

  1. Open a css file and invoke inline color editor in multiple places. Also happens with an html file.
  2. Resize the Brackets window by dragging the top edge or the left edge of the Brackets window.

Actual results: UI shakes and flickers a lot.

Expected results: UI doesn't shake and flicker a lot.

Workaround: Deal with cosmetic issue.

gruehle commented 11 years ago

Reviewed. Medium priority to @JeffryBooher

rajeshsegu commented 11 years ago

We could throttle the call of the resize handler once every 100ms. ( http://underscorejs.org/#throttle ). Today in a given second its fired close to 100+ times which is waste of DOM cycles. Meanwhile, the flicker is also related to CodeMirror resizing their code very often, we can sync them both at once is 200ms, which I think is reasonable.

redmunds commented 10 years ago

@dalcala I remember this being really bad. I'm not sure what changed, but this seems way better to me now on Win7. Are you still seeing the problem?

peterflynn commented 10 years ago

Removing top/left from title since you can see this with any resize (and same with #5258)

JeffryBooher commented 10 years ago

Adding CEF/TRACKING -- although this could be solved in shell or more efficient DOM

JeffryBooher commented 9 years ago

WOW. This got incredibly worse with CEF 2171

JeffryBooher commented 9 years ago

https://code.google.com/p/chromiumembedded/issues/detail?id=1448

peterflynn commented 9 years ago

@JeffryBooher I'm not seeing a regression here with CEF 2171. On Win 7, it actually seems to respond to resizing more smoothly and quickly than CEF 1547.

RaymondLim commented 9 years ago

@peterflynn In CEF 2171 I can see the flickering in the area covered by the border, title bar and the menu bar, but not in the side bar or the editor area.

peterflynn commented 9 years ago

I busted out the trusty high-speed camera for a quick test.

It seems like these are both things we could fix on our end:

However, I'll reiterate that to my eyes, the jitter is only a tiny bit worse than 1547 and seems reasonable enough to ship with.

peterflynn commented 9 years ago

I also checked cefclient 2171 just for kicks. The CEF content is way less responsive to resizing overall (I'm guessing because cefclient is always a debug build?), but it doesn't show either of the problems above. But I'm not sure if it's doing anything specific to repaint the border better, or if that's just something you get for free if you're using the OS-standard Aero border instead of painting your own.

JeffryBooher commented 9 years ago

@peterflynn the installed build seems to paint much faster than my "debug" build so I'm going to lower-the priority on this one for now and remove the milestone.