Let’s talk about the scrolling lag bug. It’s the end of an era here, as I finally have a bit of closure. Brace yourselves, this is a long one, and it doesn’t have a happy ending, I’m sorry to say.
As I’ve written about before, one of the chief difficulties in making QTTabBar work on Windows 7 was the fact the good old clunky-but-heavily-documented ListView control was replaced with the new smooth, sleek, and totally-undocumented ItemsView control. The biggest problem is that there was no apparent way to figure out what item the mouse was over, which is important for tons of things that QTTB does.
At first the problem seemed insurmountable, but then I stumbled upon UI Automation, which seemingly solved all my problems: It allowed me to hit-test the ItemsView accurately, and even allowed me to get the bounding box of each item (something required in order to know where to position the blue arrows). Best of all, the method was even documented!
Unfortunately, it turns out that UI Automation itself is directly responsible for the unresponsiveness that users have reported. It turns out that every single individual query degrades Explorer’s performance slightly, but permanently. After many queries, it becomes slower and slower and slower, and restarting the Explorer process is the only way to “reset the counter.”
Posting on various Microsoft developer forums about the problem yielded no useful results. One forum poster suggested I contact Microsoft Support about the issue. That sounded like a good idea, until I saw the $99 price tag. Pay Microsoft to fix their own bug? It think not. However, after some more Googling, I discovered a claim that Microsoft Support will not charge you if the issue you’re reporting turns out to be an actual bug on their end. I contacted the support line about this (yes, there’s a support line for the support line) and to my surprise, the representative confirmed this. So, I typed up a nice little report and sent it in.
I was contacted my Microsoft’s Rob Caplan about the issue, and after some back-and-forth, he confirmed it was a bug on their end. We looked for some workaround, but in the end, the only feasible one was “Just use the old ListView,” which I’m not happy with. So, we went through the process of filing an official hotfix request. That was about 2 months ago. Finally, just a few hours ago today, Rob called me to inform me that the hotfix request had been rejected on the grounds that the “use the ListView” workaround is good enough, and the problem is apparently deep enough that a fix would too complicated. Game over…
So, what can we do about it? Well, as I said, the problem only affects the ItemsView, so if you use the older ListView control, you will not experience this problem. In addition, I made several changes from Alpha 3 to Alpha 4 to minimize the number of queries made. In particular, if you don’t want to sacrifice the ItemsView, you can disable Subdirectory Tips (or at least put them on Shift-only) and that will greatly reduce the number of queries made (which will greatly slow the speed at which the lag builds up). Past that, all I can recommend is to use AutoHotKey to make a “restart explorer” hotkey to clear things up when it gets bad.
There is hope, however, albeit slim. The ItemsView is controlled by an undocumented COM interface, which I have succeeded in gaining access to. In essence, I have a whole bunch of functions with no name or parameter definitions. One of them is likely in charge of hittesting. If I can figure out which one it is, and how to call it, then all problems will be solved. Of course, even assuming I’m successful, making use of an undocumented COM interface is a REALLY BAD idea in general, as Microsoft could change it without warning. But in the absence of all other options, it looks like the only way left. Either way, I will certainly keep the Automation code around though, so we’ll have something to fall back on.
I’m sure some will say, “Scrolling lag? I don’t even know what you’re talking about!” or “Yeah I notice it, but it’s not that big a deal to me…” Sometimes I envy people like that, who are able to ignore or overlook annoying problems like this one. But me, I’m a perfectionist, and I will not feel at ease until this problem is completely eradicated. I just hope I can do so before Windows 8 comes out and inevitably breaks everything again!