Article View: comp.lang.basic.visual
Article #256Re: Performance issue with NT 4.0
From: Joe "Nuke Me Xemu" Foster
Date: Wed, 13 Mar 2002 03:17
Date: Wed, 13 Mar 2002 03:17
43 lines
3084 bytes
3084 bytes
"Anders P" <ap@comp.nospan> wrote in message <news:xIfj8.3172$Mg4.3426@news1.bredband.com>...
> I have this performance issue with NT 4.0 for my Visual Basic app. I have
> isolated the problem into the process of adding many items to a collection.
> The same code and EXE-file runs REMARKABLY slower on Win NT 4.0 than on e.g.
> Win2000 or Win98. Typical number would be 10-50 times slower on NT with
> same hardware. Anyone having clues to the reason and any workarounds (when
> upgrading the NT systems is out of the question!)?
>
> best regards
> -Anders
>
> Test the follwing code for youself (paste code in a form with command button
> and label):
>
> Private Sub Command1_Click()
> Dim dtStart As Date
> Dim dtStop As Date
> Dim collTest As Collection
> Dim i As Long
> Set collTest = New Collection
> dtStart = Now
> For i = 1 To 100000
> collTest.Add "qwrqweltjqwegkwldjgsldkjsldqwertyjf"
> Next i
> dtStop = Now
> Label1.Caption = DateDiff("s", dtStart, dtStop)
> End Sub
I think you will find that it is even worse than you think.
Test how long it takes to do "Set collTest = Nothing" too!
Have a look at this:
URL:http://groups.google.com/groups?selm=u2cjn68927u2a8%40corp.supernews.com
The "Pooled" class can be pretty much anything that will
tolerate not being cleaned up promptly.
--
Joe Foster <mailto:jlfoster%40znet.com> Wanna buy a Bridge? <http://xenu.net/>
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha!
Technical Details
Message-ID:
<u8th5qasuih877@corp.supernews.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mailReferences:
<xIfj8.3172$Mg4.3426@news1.bredband.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 110e3b,b177bb349b2c46c5 X-Google-Attributes: gid110e3b,public X-Google-Thread: fb992,b177bb349b2c46c5 X-Google-Attributes: gidfb992,public X-Google-Thread: 10cf61,b177bb349b2c46c5 X-Google-Attributes: gid10cf61,public X-Google-Thread: 111c14,b177bb349b2c46c5 X-Google-Attributes: gid111c14,public X-Google-Thread: f645d,b177bb349b2c46c5 X-Google-Attributes: gidf645d,public X-Google-Thread: f51ba,b177bb349b2c46c5 X-Google-Attributes: gidf51ba,public X-Google-ArrivalTime: 2002-03-12 19:17:15 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Joe \"Nuke Me Xemu\" Foster" <joe@bftsi0.UUCP> Newsgroups: comp.lang.basic.visual,comp.lang.basic.visual.misc,comp.lang.visual.basic,dk.edb.programmering.basic.visual-basic,microsoft.private.mvp.visualbasic,no.it.programmering.visual-basic Subject: Re: Performance issue with NT 4.0 Date: Tue, 12 Mar 2002 19:17:00 -0800 Organization: North American Marcab-Teegeeack Love Association Message-ID: <u8th5qasuih877@corp.supernews.com> Reply-To: "Joe \"Nuke Me Xemu\" Foster" <jlfoster%#56;znet%2ecom> References: <xIfj8.3172$Mg4.3426@news1.bredband.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Complaints-To: newsabuse@supernews.com Lines: 45