recheck-web icon indicating copy to clipboard operation
recheck-web copied to clipboard

Improve RecheckSeleniumAdapter#convert( Object ) performance

Open beatngu13 opened this issue 6 years ago • 3 comments

Conversion sometimes takes up to 5 or more seconds. It would be helpful (for surili as well) if we could somehow improve the conversion performance.

beatngu13 avatar Feb 25 '19 09:02 beatngu13

This simple test (which uses convert under the hood) shows the problem:

class GoogleIT {

	WebDriver driver;
	Recheck re;

	@BeforeEach
	void setUp() throws Exception {
		driver = new ChromeDriver();
		re = new RecheckImpl();
	}

	@Test
	void test() throws Exception {
		re.startTest();
		driver.get( "https://policies.google.com/privacy?hl=de&gl=de" );
		final long start = System.currentTimeMillis();
		re.check( driver, "german-privacy-policy" );
		final long end = System.currentTimeMillis();
		System.out.println( "check took " + TimeUnit.MILLISECONDS.toSeconds( end - start ) + " seconds" );
		re.capTest();
	}

	@AfterEach
	void tearDown() throws Exception {
		driver.quit();
		re.cap();
	}

}

This single check takes up to 14 seconds on my machine.

beatngu13 avatar Mar 18 '19 10:03 beatngu13

12 seconds for https://en.wikipedia.org/wiki/President_of_the_United_States.

beatngu13 avatar May 19 '19 15:05 beatngu13

We need to do some more investigation on where the actual performance bottleneck is.

  • No Golden Master, vs Golden Master present.
  • Retrieve data from Selenium (i.e. JavaScript)
  • Convert Performance
  • Diffing Algorithm
  • Persisting Golden Master

diba1013 avatar Oct 01 '19 12:10 diba1013