adobe/brackets — pull request #942 by ryanstewart (2012-05-25 17:29:57+00:00)
Title: Improve Performance of Sidebar resize by implementing requestAnimationFrame

This pull request addresses the issue of sidebar resize performance. I used requestAnimationFrame to make sure that Brackets optimizes when it does repaints (on the browser cycle instead of trying to do it on every mousemove). I also made a couple of other changes to make that process more refined:

- When the mouse gets clicked, hide the shadows and the triangle, then we don't need to worry about moving them when we do the resize. Calling the "scroll" event for the shadows caused a LOT of repaints.

- Don't worry about resizing the editor window until we're all done. This saved a ton of repaints and I'm not sure how much sense it makes to try and measure/re-render the code window in the middle of a resize.

With these changes it's *super* fast on Windows and a bit snappier on Mac as well. CPU usage however is unaffected and I think that's a CEF issue.