question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Performance problem

See original GitHub issue

Hi,

I’m having a bit of a problem with the performance. I am receiving a lot of data and when I do that my cpu is at 100%.

I ran the Visual Studio performance profiler and it says that 90% of the load come from here:

public HidDeviceData Read(int timeout) if (IsConnected) <------------

And then 80% from here:

        NativeMethods.SetupDiGetDeviceRegistryProperty(deviceInfoSet,
                                                        ref devinfoData,
                                                        NativeMethods.SPDRP_DEVICEDESC,
                                                        ref type,
                                                        descriptionBuffer,
                                                        descriptionBuffer.Length,
                                                        ref requiredSize);

It seems like it is doing a lot of stuff while trying to find out if the device is still connected? Is it necessary to do all of that before every read?

Or did I missunderstand something?

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
AdrianEggenbergercommented, Oct 20, 2020

I’ve seen that, but the HidFastReadDevice only provides fast read functions (as the name also implies). What I would need is a HidFastWriteDevice that provides fast write operations.

0reactions
amullins83commented, Oct 20, 2020

The HidFastReadDevice class essentially replicates the HidDevice class but skips the IsConnected check. This is already part of the library, so I feel like we could close this issue if that solves your problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dealing with Performance Problems
Quantity of work (untimely completion, limited production). Poor prioritizing, timing, scheduling; Lost time ; Quality of work (failure to meet quality standards).
Read more >
Top 5 Common Performance Problems
Top 5 Common Performance Problems · Shallow Work · Inability to Prioritize · False Sense of Urgency · Productive Procrastination · Low-Quality Output....
Read more >
5 Common Reasons for Performance Issues (Plus 3 Tips to ...
1. They lack knowledge or skill. · 2. They have unclear or unrealistic expectations. · 3. They aren't motivated. · 4. The job...
Read more >
9 Examples of a Performance Issue
A performance issue is a failure to meet the basic requirements of a job. They are based on reasonable expectations of behavior and...
Read more >
68 Examples of Performance Problems
Performance problems are workplace issues caused by the performance of an individual. This implies a situation that calls for management ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found