R.Wieser
2021-12-14 07:44:20 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
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