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

Systeminformation.graphics This function will cause high CPU utilization #932

Open
BlockCnFuture opened this issue Sep 6, 2024 · 0 comments

Comments

@BlockCnFuture
Copy link

Describe the bug
When calling the Systeminformation.graphics function, especially when calling it within an interval, you will see high CPU utilization.

To Reproduce
Steps to reproduce the behavior:

  1. used function 'Systeminformation.graphics' in Interval, call it every two second

Current Output
This function will cause high CPU utilization

Expected behavior
Should not cause high CPU utilization

Environment (please complete the following information):

  • systeminformation package version: 5.22.4
  • OS: Windows 11
  • Hardware HP15L

To get all needed environment information, please run the following command:

  ┌─────────────────────────────────────────────────────────────────────────────────────────┐
│  SYSTEMINFORMATION                                                      Version: 5.22.4 │
└─────────────────────────────────────────────────────────────────────────────────────────┘

Operating System:
──────────────────────────────────────────────────────────────────────────────────────────
Platform         : Windows
Distro           : Microsoft Windows 11 专业版
Release          : 10.0.22631
Codename         :
Kernel           : 10.0.22631
Arch             : x64
Hostname         : tuzhis
Codepage         : 936
Build            : 22631
Hypervisor       :
RemoteSession    : true

System:
──────────────────────────────────────────────────────────────────────────────────────────
Manufacturer     : HP
Model            : Victus by HP 15L Gaming Desktop TG02-2xxx
Version          :
Virtual          :

CPU:
──────────────────────────────────────────────────────────────────────────────────────────
Manufacturer     : Intel
Brand            : Core™ i7-14700F
Family           : 6
Model            : 183
Stepping         : 1
Speed            : 2.1
Cores            : 28
PhysicalCores    : 20
PerformanceCores : 28
EfficiencyCores  :
Processors       : 1
Socket           : LGA1700

Additional context
This problem is probably caused by using promise.all to execute multiple PowerShell commands concurrently under Windows. You can change it to execute one by one. The execution will not be much slower, but the CPU utilization problem should be optimized a lot.

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