Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

All your files have been destroyed (sorry). Paul.


devel / comp.os.ms-windows.programmer.win32 / Re: calls to ActiveX components I wrote are slow. What could be causing it ? Found it.

SubjectAuthor
* calls to ActiveX components I wrote are slow. What could be causing it ?R.Wieser
+- Re: calls to ActiveX components I wrote are slow. What could be causing it ?R.Wieser
+* Re: calls to ActiveX components I wrote are slow. What could be causing it ?JJ
|+- Re: calls to ActiveX components I wrote are slow. What could be causing it ?R.Wieser
|`- Re: calls to ActiveX components I wrote are slow. What could be causing it ?R.Wieser
`- Re: calls to ActiveX components I wrote are slow. What could be causing it ? FoR.Wieser

1
calls to ActiveX components I wrote are slow. What could be causing it ?

<sp9i0t$6ib$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=262&group=comp.os.ms-windows.programmer.win32#262

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!BHGTVyTGRwF2ntnqLVfpDg.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: calls to ActiveX components I wrote are slow. What could be causing it ?
Date: Tue, 14 Dec 2021 08:44:20 +0100
Organization: Aioe.org NNTP Server
Lines: 33
Message-ID: <sp9i0t$6ib$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="6731"; posting-host="BHGTVyTGRwF2ntnqLVfpDg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-MSMail-Priority: Normal
X-Notice: Filtered by postfilter v. 0.9.2
 by: R.Wieser - Tue, 14 Dec 2021 07:44 UTC

Hello all,

Over time I've been writing a few ActiveX components, but have to notice
that calls to it are, in comparision to system components like the
dictionary one, rather slow.

Case in point, I've got a loop which goes thru a dictionary object and
compares the key against something retrieved from an ActiveX component I
wrote. When I read from my ActiveX component before the loop and put it in
a temp var and use that inside the loop the speed gain is /at least/ a
factor of 10 ...

It also doesn't matter if what I read is complex (a converted-from UTF-8
string) or simple (a value like a boolean), meaning the problem is (likely)
not in those functions.

The problem is that I've got no idea where to look/what to look at. :-(

I do remember having read about some sort of caching mechanism related to
the "GetIDsOfNames" function (not fully sure if that was the one), but have
found nothing in that regard. Also, I'm offloading the work to the TypeInfo
object, which I assumed would handle stuff like that.

Bottom line:
I need a pointer or two to where/what to look at to speed-up my ActiveX
objects handling of calls to it.

Regards,
Rudy Wieser

Re: calls to ActiveX components I wrote are slow. What could be causing it ?

<spa4fk$1419$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=263&group=comp.os.ms-windows.programmer.win32#263

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!news.swapon.de!aioe.org!BHGTVyTGRwF2ntnqLVfpDg.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: calls to ActiveX components I wrote are slow. What could be causing it ?
Date: Tue, 14 Dec 2021 13:58:38 +0100
Organization: Aioe.org NNTP Server
Lines: 15
Message-ID: <spa4fk$1419$1@gioia.aioe.org>
References: <sp9i0t$6ib$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="36905"; posting-host="BHGTVyTGRwF2ntnqLVfpDg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Response
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Notice: Filtered by postfilter v. 0.9.2
X-MSMail-Priority: Normal
 by: R.Wieser - Tue, 14 Dec 2021 12:58 UTC

I fully forgot to mention that I'm calling the objects from within a bit of
VBScript, and the object itself returns integers, longs and BStrings (no
variants).

I've also tried to see how my and a dictionary object respond to a being
called by a simple program using the objects "Invoke" method. I measured
the time it took to do 0x1000 calls, and did not see any significant
difference between the two.

IOW, no indication of a slowdown. :-|

Regards,
Rudy Wieser

Re: calls to ActiveX components I wrote are slow. What could be causing it ?

<18zbs4gg715ov$.2w25icl36mrk$.dlg@40tude.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=264&group=comp.os.ms-windows.programmer.win32#264

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!ixZ1YYWOqC9whU0smvPh8Q.user.46.165.242.91.POSTED!not-for-mail
From: jj4public@gmail.com (JJ)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: calls to ActiveX components I wrote are slow. What could be causing it ?
Date: Wed, 15 Dec 2021 21:55:22 +0700
Organization: Aioe.org NNTP Server
Message-ID: <18zbs4gg715ov$.2w25icl36mrk$.dlg@40tude.net>
References: <sp9i0t$6ib$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="64488"; posting-host="ixZ1YYWOqC9whU0smvPh8Q.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: 40tude_Dialog/2.0.15.84
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
X-Notice: Filtered by postfilter v. 0.9.2
 by: JJ - Wed, 15 Dec 2021 14:55 UTC

On Tue, 14 Dec 2021 08:44:20 +0100, R.Wieser wrote:
> Case in point, I've got a loop which goes thru a dictionary object and
> compares the key against something retrieved from an ActiveX component I
> wrote.

How many keys are in the dictionary?

Re: calls to ActiveX components I wrote are slow. What could be causing it ?

<spd61m$1ajv$2@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=265&group=comp.os.ms-windows.programmer.win32#265

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!aioe.org!BHGTVyTGRwF2ntnqLVfpDg.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: calls to ActiveX components I wrote are slow. What could be causing it ?
Date: Wed, 15 Dec 2021 17:37:57 +0100
Organization: Aioe.org NNTP Server
Lines: 10
Message-ID: <spd61m$1ajv$2@gioia.aioe.org>
References: <sp9i0t$6ib$1@gioia.aioe.org> <18zbs4gg715ov$.2w25icl36mrk$.dlg@40tude.net>
Injection-Info: gioia.aioe.org; logging-data="43647"; posting-host="BHGTVyTGRwF2ntnqLVfpDg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MSMail-Priority: Normal
X-Notice: Filtered by postfilter v. 0.9.2
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-RFC2646: Format=Flowed; Original
 by: R.Wieser - Wed, 15 Dec 2021 16:37 UTC

JJ,

> How many keys are in the dictionary?

Currently about 650. How's that important ?

Regards,
Rudy Wieser

Re: calls to ActiveX components I wrote are slow. What could be causing it ?

<spffi8$l1h$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=268&group=comp.os.ms-windows.programmer.win32#268

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!BHGTVyTGRwF2ntnqLVfpDg.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: calls to ActiveX components I wrote are slow. What could be causing it ?
Date: Thu, 16 Dec 2021 14:39:11 +0100
Organization: Aioe.org NNTP Server
Lines: 11
Message-ID: <spffi8$l1h$1@gioia.aioe.org>
References: <sp9i0t$6ib$1@gioia.aioe.org> <18zbs4gg715ov$.2w25icl36mrk$.dlg@40tude.net>
Injection-Info: gioia.aioe.org; logging-data="21553"; posting-host="BHGTVyTGRwF2ntnqLVfpDg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Priority: 3
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Notice: Filtered by postfilter v. 0.9.2
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
 by: R.Wieser - Thu, 16 Dec 2021 13:39 UTC

JJ,

To double-check I tested that "for each" dictionary loop with "foo =
oDict.count" and also with "foo = oMyObject.DummyFunc" (doing nothing than
returning a boolean) inside. When using the former the loop went
considerably faster than when using the latter.

Regards,
Rudy Wieser

Re: calls to ActiveX components I wrote are slow. What could be causing it ? Found it.

<sqvke1$14if$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=276&group=comp.os.ms-windows.programmer.win32#276

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!BHGTVyTGRwF2ntnqLVfpDg.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: calls to ActiveX components I wrote are slow. What could be causing it ? Found it.
Date: Mon, 3 Jan 2022 20:56:34 +0100
Organization: Aioe.org NNTP Server
Lines: 24
Message-ID: <sqvke1$14if$1@gioia.aioe.org>
References: <sp9i0t$6ib$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="37455"; posting-host="BHGTVyTGRwF2ntnqLVfpDg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Response
 by: R.Wieser - Mon, 3 Jan 2022 19:56 UTC

> Over time I've been writing a few ActiveX components, but have to notice
> that calls to it are, in comparision to system components like the
> dictionary one, rather slow.

Although I switched all debugging output off (making those calls disappear
in the outputted executable), I didn't disable the functions which created
the strings fed to the debugging output.

In my case that was a GUID-to-string (outputted) followed by a lookup in the
HKCR\CLSID branch in registry for the its name (also outputted). Removing
those too made all the difference.

.... and all I needed to do to figure the above out was to write some code to
intercept all method calls to the Dictionary object (to see what-and-how it
was called and than maybe try to mimick it), which included the same
debugging output - and thus the same slow-down.

Murphy's Law struck again : double-check that what you're sure of can't be
the cause isn't the cause anyway. :-)

Regards,
Rudy Wieser

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor