|
Rank: Advanced Member Groups: Member
Joined: 6/13/2014 Posts: 38
|
Hi EO_Support I have a main form and it is opening another child form with EO Web browser control. This child form is opened multiple times with different URLs and it always takes at least 5-7 seconds to load the website(even from local machine). If I open the website from chrome or IE it work fine and loading in no time. Even for plain HTML pages it is taking 4-6 seconds of time so it is not issue with website or webpage To solve this I tried to create the webcontrol at run time, but every time the child form is closed it also destroy the web view and next time I try to set any url like webbrowsercontrol.WebView.Url = "xyz.com" it gives error that WebView is already destroyed. Please let me know the life cycle of WebView and how can I solve this or is there any way that I can keep the web view or web control cached and improve loading performance ? Note : Cache path is already set for WebView update : we have used .Net profiler to see the internal loading and memory allocation and 97% of time is used in initialization of EO only. see below images for more reference. Regards, Ashish
|
|
Rank: Newbie Groups: Member
Joined: 1/20/2015 Posts: 4
|
Have you tried the multiple dll solution instead of the single dll? I guess the single dll is compressed with all of the info needed then must be unpacked at load time. This may be the time you are seeing. The multiple dll solution doesn't need unpack. It is worth a try. We did the multi dlls, set the cache path, and preloaded the view and got much better performance.
|
|
Rank: Newbie Groups: Member
Joined: 5/12/2015 Posts: 9
|
I am having a similar performance issue of 5-7 second load times when chrome can load the same page in 1-3 seconds. For my part, we are not displaying the browser anywhere, but are instead using a ThreadRunner to create the WebView and load the url. I am not familiar with the multiple dll solution, can you provide more information? The timer I ran started before the LoadUrl call and ended after the WaitOne call. The jist of our code is this:
Code: C#
ThreadRunner runner = new ThreadRunner();
WebView view = runner.CreateWebView();
object image = runner.Send((WebView view2, object args) =>
{
NavigationTask loadTask = view2.LoadUrl(uri.AbsoluteUri);
if (loadTask.WaitOne(BrowserLoadTimeoutMillis))
{
view2.Resize(view.GetPageSize().Width, view.GetPageSize().Height);
Image capture = view2.Capture();
return capture;
}
return null;
}, view, null);
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,203
|
|
|
Rank: Newbie Groups: Member
Joined: 5/12/2015 Posts: 9
|
Thank you, that made a big difference.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,203
|
You are welcome. Please feel free to let us know if there is anything else.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/13/2014 Posts: 38
|
Hello eo_support,
yes multi dll solution has made some difference but still it always takes 3-4 seconds every time we create new WebView. can you tell us how we can keep the webview alive in one form and reuse it in another form ?
Regards, Ashish
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,203
|
Hi,
You just set the WebControls' Parent to another Form.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 10/7/2015 Posts: 35
|
That URL is currently pointing to an "overview" page with no information about multi-dll in sight. Is there an updated URL?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,203
|
Panda wrote:That URL is currently pointing to an "overview" page with no information about multi-dll in sight. Is there an updated URL? We no longer have separate multi-DLL build in the current release. The optimization used in the old multi-DLL build has already been implemented in the main build in the current release. So it is no longer needed.
|
|