Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance when using ExecMethod vbscript api #9

Open
kessler opened this issue May 22, 2015 · 0 comments
Open

performance when using ExecMethod vbscript api #9

kessler opened this issue May 22, 2015 · 0 comments

Comments

@kessler
Copy link
Owner

kessler commented May 22, 2015

Copied directly from #7 :

See cscript-registry-benchmark and its output.

Calling registry.GetStringValue directly (eg, agnostic mode) is roughly 2x as fast as registry.ExecMethod_("GetStringValue", ..) with a "__ProviderArchitecture" flag / context.

The relevant bit of the output is (the third column is the difference to the agnostic duration):

Agnostic:                     2.219 sec  
64-bit:                       4.797 sec   +2.578 
64-bit (predefined method):   3.906 sec   +1.688 

As the third row shows, a small speed gain can be made by reusing the method object:

' Initialize
set method = registry.Methods_("GetStringValue")

' Then later ..
Set params = method.Inparameters
params.hDefKey = ..

Instead of doing registry.Methods_("GetStringValue").Inparameters each time.

PS. You might see "20000 sec" in the output, that's a formatting mistake, should be 2 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant