recheck-web
recheck-web copied to clipboard
Improve RecheckSeleniumAdapter#convert( Object ) performance
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.
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.
12 seconds for https://en.wikipedia.org/wiki/President_of_the_United_States.
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