Skip to content

[Feature]: Set or Get the WebView2 Control thread priority. #4610

Open
@PCRacer

Description

Describe the feature/enhancement you need

I would like to simply call a function or procedure to set or get the WebView2 control's thread priority in order to match the WIN32 app's thread priority.

Simply put, I would like to escalate or deescalate the thread priority of the WebView2's instance to match to that of the WIN32 app running on it.

The scenario/use case where you would use this feature

This will enable high performance or normal system apps to function at the PC's highest or lowest capability, either for power conservation or high speed calculations or data search/manipulation at maximum CPU speed available.

How important is this request to you?

Very Important, as there is no way in accessing the WebView2 control's handle in order to set its thread priority!

Suggested implementation

Operation:

WebView2.ThreadPriority.SetPriority = IDLE_PRIORITY_CLASS
WebView2.ThreadPriority.SetPriority = NORMAL_PRIORITY_CLASS
WebView2.ThreadPriority.SetPriority = HIGHEST_PRIORITY_CLASS . . . . etc.

Var WebViewPriority: Integer;

WebViewPriority = WebView2.ThreadPriority.GetPriority;

What does your app do? Is there a pending deadline for this request?

This will also be more advantageous for online gamers or high performance stock trading systems in order to reduce latency and increase operational application speed for maximum data search and/or manipulation or feedback of data from an online database.

This will also be most advantageous for low power systems to conserve energy when running on battery power. The battery power switch from AC will be detected by the app and accordingly lower the WebView2 control's thread priority in order to further reduce energy consumption and speed of operation.

AB#52578898

Metadata

Labels

feature requestfeature requesttrackedWe are tracking this work internally.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions