From: Ahmed A. <asa...@ya...> - 2014-08-25 09:20:20
|
Hi Thashi, - Adding user-list - HTML parsing as well, but this is a must. - CSS parsing Ahmed ________________________________ From: dhashi88 <dha...@ho...> To: Ahmed Ashour <asa...@ya...> Sent: Monday, August 25, 2014 11:09 AM Subject: Re: [Htmlunit-user] Webclient consuming more time than loading time. Hi Ahmed, Is there any other factors in webclient wich consumes more execution time? Regards, Thashi Sent from my 4G Ready Samsung Galaxy S4 -------- Original message -------- From: Ahmed Ashour Date:25/08/2014 2:29 PM (GMT+05:30) To: htm...@li... Subject: Re: [Htmlunit-user] Webclient consuming more time than loading time. Hi, I guess the time to execute the JavaScript. Ahmed ________________________________ From: dhashi88 <dha...@ho...> To: htm...@li... Sent: Monday, August 25, 2014 10:15 AM Subject: [Htmlunit-user] Webclient consuming more time than loading time. Im using HtmlUnit to grab content of web page (having javascript) Stopwatch timer = new Stopwatch().start(); final WebClient webClient = newWebClient(BrowserVersion.CHROME); webClient.getOptions().setThrowExceptionOnFailingStatusCode(false); webClient.getOptions().setJavaScriptEnabled(true); webClient.getOptions().setActiveXNative(false); webClient.getOptions().setAppletEnabled(false); webClient.getOptions().setCssEnabled(false); webClient.getOptions().setDoNotTrackEnabled(true); webClient.getOptions().setGeolocationEnabled(false); webClient.getOptions().setPopupBlockerEnabled(true); webClient.getOptions().setPrintContentOnFailingStatusCode(false); webClient.getOptions().setThrowExceptionOnFailingStatusCode(false); webClient.getOptions().setThrowExceptionOnScriptError(false); webClient.getOptions().setUseInsecureSSL(true); webClient.setCssErrorHandler(newSilentCssErrorHandler()); webClient.getCookieManager().setCookiesEnabled(false); webClient.getOptions().setRedirectEnabled(false); webClient.getOptions().setTimeout(900); System.out.println("1.0 : " + timer.elapsed(TimeUnit.MILLISECONDS)); final HtmlPage page = webClient.getPage(url); System.out.println(page.getWebResponse().getLoadTime()); System.out.println("1.1 : " + timer.elapsed(TimeUnit.MILLISECONDS)); then the result i got is like this 1.0 : 2 707 1.1 : 8003 Why webclient consuming more time (more than webresponse load time)? how can i reduce that time? ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |