Selenium: PhantomJS is slower than Firefox
I wrote a Selenium test that clicks my ExtJS-Twisted web app and is very slow.
Can someone explain why PhantomJS is so much slower than Firefox in my configuration? What's wrong with urllib2 recv method?
Profiler statistics:
-
PhantomJS
Ran 1 test in 137.150s ncalls tottime percall cumtime percall filename:lineno(function) 4485 124.000 0.028 124.000 0.028 {method 'recv' of '_socket.socket' objects}
-
Firefox
Ran 1 test in 36.660s ncalls tottime percall cumtime percall filename:lineno(function) 96910 23.061 0.000 23.061 0.000 {method 'recv' of '_socket.socket' objects}
Network statistics:
[tester@server ~]$ tracepath 192.168.200.65
1: 192.168.200.77 (192.168.200.77) 0.207ms pmtu 1500
1: 192.168.200.65 (192.168.200.65) 0.773ms reached
1: 192.168.200.65 (192.168.200.65) 0.351ms reached
Resume: pmtu 1500 hops 1 back 64
[tester@server ~]$ tracepath 192.168.200.83
1: 192.168.200.77 (192.168.200.77) 0.087ms pmtu 1500
1: 192.168.200.83 (192.168.200.83) 0.733ms reached
1: 192.168.200.83 (192.168.200.83) 0.654ms reached
Resume: pmtu 1500 hops 1 back 64
Testing machines:
- 77th web application works
- 65th run
Docker
sincePhantomJS
(reason: https://stackoverflow.com/questions/30618113/selenium-webdriver-socket-error-connection-reset-by-peer-for-non-root-users ) - 83rd launches local
Firefox
orPhantomJS
65th against web app on 77th sec.
+3
source to share
No one has answered this question yet
Check out similar questions: