Efficiency – Virtual Dub

Today I was reading the Blog at VirtualDub.org.
It reinforced my believe that there is too much inefficient code/shit out there in the world.
And it’s not just SW, it’s HW too. I’m horrified when I read some video card specs. with 500W power consumption… seriously who needs an oven/central heating in their computer? Talk about global warming…

There is serious problem with idle handling of the PC platform, OS support, programmers practices.
Please stop with the background tasks
The main problem is Disk IO handling, and maybe memory bandwidth, network bandwidth. Specifically the lack of priority, or rather in general that only CPU time can be prioritized. (Net QoS is not what I’m talking about)
CPU is rarely the bottleneck, when it comes to real time behavior. (video capture, GUI response)
When an “idle” task starts to read/write data from/to the disk, it can have a serious performance impact. (So does windows update background intelligent transfer on on-line games/videos…) The problem is not just large amount of data, but just disk seek (time) is enough to do some damage (dropped frames…). Direct disk usage is not even the most common cause of performance problems, but rather indirect access due to paging. When an “idle” task requests some of it’s memory that are paged out to disk, windows is happy to read them back from the page file. And memory paging is a high priority task! This is how your idle task becomes high priority… and it’s not fun when you have 1-2 GB size pagefile.

interesting/funny quotes:
About Visula Studio Intellissense/customer support:
“I’m now of the opinion that running tasks in the background is a bad idea and contributes to the opinion that computers are slow and unpredictable. In this case, the Visual Studio programmers got the idea that Intellisense could be made low impact and “invisible” by running it as a low priority background thread, which ignores the problem that it still drains a huge amount of I/O bandwidth on the hard disk. This isn’t the first time the Visual Studio team has done something like this — I love it when the .NET Framework updates and suddenly a lot of CPU is taken up by “background” NGEN tasks for minutes at a time. If everyone did this, computers would be stuck at 100% CPU for hours at a time with no apparent reason.”
“We’ve now gotten to the point where computers are fast enough to perform many everyday computing tasks much faster than necessary, which unfortunately has given rise to the opinion that we don’t need efficient code anymore. While it’s true that there’s no need to make a window come up in 0.5ms when it currently comes up in 5ms, I think the recent trend toward low-power, quieter, and lighter-weight devices is providing a new reason for efficient code. For many programs, it’ll no longer be about making the program run faster, but to make it run more efficiently, letting the CPU and GPU idle more, allowing the hard drive and fans to spin down, and prolonging battery life on laptops. This is nothing new to people who worked on older platforms or on mobile devices, but this kind of thinking isn’t as common in the desktop world.”
“I should note that it’s not actually that easy, because Intellisense is expected to return useful data from files that don’t even come close to compiling, whereas the compiler is expected not to spew 2MB of errors because you forgot a semicolon.”
“”we can’t fix this horrible bug, because then we couldn’t fulfill this design requirement”–or put differently, when developers refuse to acknowledge something like “doesn’t thrash the disk for minutes at a time” as a requirement, because they’d have to admit that they’re not capable of fulfilling all of the requirements. Of course, this leads to many of those absurd “this behavior is by design” KB entries…”
“Since performance bugs are dependent upon workload and machine configuration, you can’t gauge a performance bug in binary terms unless you are running specific test cases or have an egregiously bad case, like an infinite loop or close enough (projected running time exceeds the lifetime of the universe).

by-the-by Borland Developer Studio 2006 is at least as bad as Visual Studio. I used and still use Borland Delphi 7 but you cannot buy it anymore, so I bought BDS 2006. It’s full of bugs, performance hogs…