Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NHtmlUnit] - Too slow when enable javascript #26

Closed
tienducitt opened this issue May 9, 2016 · 5 comments
Closed

[NHtmlUnit] - Too slow when enable javascript #26

tienducitt opened this issue May 9, 2016 · 5 comments

Comments

@tienducitt
Copy link

tienducitt commented May 9, 2016

With the same browser setting, HtmlUnit took 8 seconds to navigate, but with NHtmlUnit it took 220 seconds,
Any ideas? Am i wrong somewhere?

Here is my setting:

webClient = new WebClient(BrowserVersion.CHROME);
webClient.Options.JavaScriptEnabled = true;
webClient.Options.CssEnabled = false;
webClient.Options.AppletEnabled = false;
webClient.Options.Timeout = 30000;
webClient.Options.RedirectEnabled = true;
webClient.Options.ThrowExceptionOnFailingStatusCode = false;
webClient.Options.ThrowExceptionOnScriptError = false;

Navigate

page = WebBrowserHelper.Instance.navigate("http://vnraovat.net/register");

Thanks,

@asbjornu
Copy link
Member

@tienducitt I expect that the overhead introduced by IKVM might be to blame, so there's not much we can do about this than hope performance get better with newer versions of IKVM. But how long does it take with JavaScript disabled? And what's the WebBrowserHelper class?

@tienducitt
Copy link
Author

It 's work fine without javascript. 1 second with HtmlUnit and 3 second with NHtmlUnit.
WebBrowserHelper is just a small util, it does not effect performance.

So may be I have to find another solution in .NET, in java, it's work very nice.
Thank you,

@asbjornu
Copy link
Member

@tienducitt That's ok. I'm trying to get out a new release based on the latest HtmlUnit and IKVM soon. I'll post here once it's out so you can re-run your test and see if it has improved. Sounds good?

@tienducitt
Copy link
Author

My task is a litle bit urgent, so maybe now I need to find another solution to work in .NET.
Btw, thank you so much, create a new release and it will help someone like me in the future (include me).
Thank you and sorry for my english :))

@asbjornu
Copy link
Member

I wouldn't expect this project to receive an update before IKVM is ported to .NET Core. See #35 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants