Search code examples
c#cpu-usageperformancewin32-process

Increase performance in Long Operations


I have a file encryption program. When the program is encrypting files, it doesn't exceed 25% CPU usage, hence it is slow.

How can I make the OS assign to it more CPU load? (Such as WinRAR, when it compresses files, it reaches 100% from CPU load).


[Edit]: As my cores are 4, it doesn't use more than one core. How can I make it use the rest of cores?


Solution

  • Unless you are otherwise throttling the application it will use as much CPU as the OS allows it to - which should be up to 100% by default. I would guess that some other resource is the bottleneck.

    Are you streaming the data to encrypt from a remote location? From a disk that is for some reason quite slow?