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

Improve JLink serial number lookup time on Windows #135

Merged
merged 1 commit into from
Oct 19, 2017

Conversation

mrodem
Copy link
Contributor

@mrodem mrodem commented Oct 12, 2017

When finding JLink serial numbers in Windows registry, a recursive search is performed below HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB to find PortName and ParentIdPrefix values.

By default, the reg.exe command searches all registry types. However, we are only interested in string values (REG_SZ). Adding /t REG_SZ to the query command can improve query performance significantly in cases where the user has a lot of non-string entries in the registry.

When finding JLink serial numbers in Windows registry, a recursive search
is performed below HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB
to find PortName and ParentIdPrefix values.

By default, the reg.exe command searches all registry types. However, we
are only interested in string values (REG_SZ). Adding "/t REG_SZ" to the
query command can improve query performance significantly in cases where
the user has a lot of non-string entries in the registry.
Copy link
Contributor

@bihanssen bihanssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mrodem mrodem merged commit f2b5d47 into master Oct 19, 2017
@mrodem mrodem deleted the fix/improve-registry-lookup-performance branch October 19, 2017 09:00
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

Successfully merging this pull request may close these issues.

2 participants