Share one renderer process for multiple webview2 instances which load the same html file

Mahmoud Abukhamseh 5 Reputation points
2023-03-09T11:30:19.77+00:00

I have a small WinForms app that opens many forms and each form contains an instance of webview2 control.
Inside that control, I load an HTML file that exists on the local hard disk. My question is that for every new form, I create I can see a new renderer process created on the task manager. This new process consumes a lot of memory. Is it possible to share one renderer process between all these instances as they all load the same HTML page?

Developer technologies | .NET | .NET Runtime
Developer technologies | .NET | Other
Microsoft Edge | Microsoft Edge development
{count} vote

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-03-10T06:58:06.4633333+00:00

    Hi @Mahmoud Abukhamseh ,

    According to your description, you can try to put multiple profiles under a single user data folder to save system resources. For more information, please read Support multiple profiles under a single user data folder.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards,

    Shijie Li

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.