adobe/brackets — pull request #5040 by redmunds (2013-09-03 22:57:04+00:00)
Title: QuickView performance improvements

This implements improvements items 1 and 2 from #4910. Note that item 3 will cause a reduction in functionality, so that should only be implemented if items 1 and 2 are not sufficient for all use cases.

To verify improvements, I added (locally) PerfUtils timers in queryPreviewProviders. I still have these branches on my local machine if anyone would like me to push them to github for testing.

Results are displayed in "min/avg(count)/max/last" where numbers are in milliseconds.

**Item 1 Test**

For this test, I opened QuickView/unittest-files/test.css, moused around for 30 seconds, occasionally pausing to show popover. This is meant to test the number of page scans.

Before: 0/0.6(429)/20/0
After: 0/1.0(15)/16/0

**Summary:**
The count drops from 429 to 15, so *significantly* less scanning is happening in page.

The average time per scan goes up from 0.6 to 1.0 ms, but I don't think this is significant because "mousing around in page" is such as inexact test, and population of the after test is much smaller, so it could be due to where mouse was paused.

**Item 2 Test**

For this test, I opened test/perf/OpenFile-perf-files/jquery.mobile-1.1.0.min.css, with wrap lines off, moused around for 30 seconds, occasionally scrolling horizontally and pausing to show popover. This is meant to test the time spent scanning long lines of code.

Before: 0/88.1(80)/158/88
After: 0/49.6(8)/113/5

**Summary:**
The average time drops from 88.1 to 49.6, so much less time is spent scanning each long line.

The count drops much less significantly in this test because I had wrap lines off, so I spent a lot of the time scrolling horizontally.