Dear Essential Objects Support Team,
We are writing to report a significant performance issue we are experiencing with the EO.WebBrowser component.
Background: We have been a licensed user of Essential Objects since 2017. Our primary product is a shell application that utilizes the EO.WebBrowser component to open and display our various web-based applications within different tabs.
The Problem: Recently, we have started receiving an increasing number of complaints from our users regarding poor performance and slow page load times. Our internal investigation pointed towards the EO.WebBrowser component as the potential bottleneck.
To verify this, we created a minimal, isolated test application using WinForms. This application contains two separate forms for a direct, side-by-side comparison:
1. One form uses your EO.WebBrowser component.
2. The other form uses Microsoft's WebView2 component.
In our tests, both forms were configured to load the exact same URL. The results were consistent and alarming: the form using EO.WebBrowser is approximately 10 times slower to completely load and render the page compared to the form using Microsoft WebView2.
We would like to understand the potential reasons for this substantial performance difference. Are there any specific configurations, known issues, or best practices we should be aware of to improve the load times with EO.WebBrowser?
For your reference, we have attached the simplified source code for both test forms below.
We appreciate your time and assistance in resolving this critical issue.
Best regards,
Code for the Test Application
Form1 (Using EO.WebBrowser) This form demonstrates the performance of the EO.WebBrowser component.
Code: C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
private Stopwatch stopwatch;
public Form1()
{
InitializeComponent();
InitializeBrowser();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void InitializeBrowser()
{
stopwatch = new Stopwatch();
webControl1.WebView = webView2;
webView2.LoadCompleted += WebView2_LoadCompleted;
stopwatch.Start();
webView2.LoadUrl(Common.url, true);
}
private void WebView2_LoadCompleted(object sender, EO.WebBrowser.LoadCompletedEventArgs e)
{
stopwatch.Stop();
Debug.WriteLine($"EO.WebBrowser - Page load time: {stopwatch.ElapsedMilliseconds} ms");
}
}
}
Form2 (Using Microsoft.WebView2) This form demonstrates the performance of the Microsoft WebView2 component for comparison.
Code: C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
public partial class Form2 : Form
{
Stopwatch stopwatch = new Stopwatch();
public Form2()
{
InitializeComponent();
}
private async void Form2_Load(object sender, EventArgs e)
{
this.Show();
Application.DoEvents();
webView21.NavigationStarting += WebView21_NavigationStarting;
webView21.NavigationCompleted += WebView21_NavigationCompleted;
await webView21.EnsureCoreWebView2Async();
webView21.CoreWebView2.Navigate(Common.url);
}
private void WebView21_NavigationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2NavigationCompletedEventArgs e)
{
stopwatch.Stop();
Debug.WriteLine($"Microsoft.WebView2 - Page load time: {stopwatch.ElapsedMilliseconds} ms");
}
private void WebView21_NavigationStarting(object sender, Microsoft.Web.WebView2.Core.CoreWebView2NavigationStartingEventArgs e)
{
stopwatch.Restart();
}
}
}