Has anyone else noticed that "CLS /C" is significantly slower in Win7 than in XP? For a 9999-line console screen buffer the difference here is .61 second vs. .22 second. Is this because of the new console model in Win7?
On Thu, 22 Sep 2011 13:13:31 -0400, rconn <> wrote:
|> Has anyone else noticed that "CLS /C" is significantly slower in Win7
|> than in XP?
|Haven't noticed. All CLS /C does is call FillConsoleOutputCharacter and
|FillConsoleOutputAttribute, so any timing difference would be in the console
The "space" key in the middle of my Gateway2000 Anykey keyboard's 8-arrow-key
array has been programmed to "C-L-S-Enter" for about 20 years. And for about 10
years I've had "alias acls=*cls /c". I press that key a lot, usually after "a".
The difference in how fast it works (Win7 vs. XP) is striking.
On Fri, 23 Sep 2011 01:18:42 -0400, rconn <> wrote:
|> I can do it with a plugin in 0:00:00.00.
|Doubtful, because you can't do it with a single call. (The API doesn't work
|if you try to do more than 64K.)
I remember such a limitation for some console APIs, but the docs for
FillConsoleOutputAttribute and FillConsoleOutputCharacter (VS2008/2010) don't
mention it. And it doesn't seem to be the case. The code I'm using (below,
built with VS2008) works in a 80 x 9999 buffer (and a 157 x 9999 buffer in .01
sec). In testing, I first fill up the buffer with a few "DIR /s c:\"s and check
that it has been cleared entirely (it has, on both XPSP3 and Win7SP1).