Launching Firefox very slow on Mac OS X 10.7 Lion

147 views
Skip to first unread message

Ren

unread,
Oct 15, 2011, 9:41:29 PM10/15/11
to Selenium Users
I'm using Firefox driver (Selenium 2.8) with Java to test our web app.
Since I upgraded to Max OS X 10.7, Selenium takes me 15+ seconds to
launch Firefox.

I dig into the code and found the problem in
org.openqa.selenium.net.INetAddress class. The following line of code
will take 15+ seconds to execute when I'm not plugged in a network.

this.hostName = inetAddress.getHostName();

I've got two NIC on my mac, one LAN and one wifi. If I'm only
connected to wifi I will have this problem.

I it's more of a bug of the Mac OS X JDK than Selenium, getHostName()
shouldn't take that long to return. However, does anyone have
suggestion to a short term fix? What about:

this.hostName = "localhost";

?

Stephen Friedrich

unread,
Sep 3, 2012, 5:48:46 PM9/3/12
to seleniu...@googlegroups.com
I can top this problem: For me firefox startup takes 90 seconds, because several calls to getHostName() take 12 seconds each.
The problem seems to be that selenium creates an INetAddress (selenium class) for each java.net.InetAddress found on each network interface.
The INetAddress constructor immediately calls getHostName() which does a reverse lookup.
The irony is that the retrieved host name isn't normally used (only in some error diagnostics it seems).
I patched Selenium's INetAddress to store the java.net.InetAdress and only call getHostName() once when needed.
FF startup is down to 3 seconds now.

Any word from a selenium developer?

Krishnan Mahadevan

unread,
Sep 3, 2012, 8:35:26 PM9/3/12
to seleniu...@googlegroups.com
Stephen,
Allthough most of the developers of selenium are part of this group you may still want to either post this on the selenium-developers group or directly raise a bug against the FirefoxDriver, attach you patch to it and get on the selenium irc chat and talk this out. 
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/sO1K3WqeIs8J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

Vikram

unread,
Feb 27, 2014, 4:57:14 AM2/27/14
to seleniu...@googlegroups.com
Hi All,

I am still facing this issue with MAC 10.9.1 , selenium-firefox-driver-2.39.0.jar

Any one got better solution ?

I have compared timings and found that FF driver takes  3 - 4 times that of Chrome driver . 

Please share your solutions

Thanks in advance.

Regards,
Vikram

On Wednesday, September 5, 2012 3:44:30 PM UTC+2, Szymon Rapacki wrote:
I have the same problem. Could you publish your workaround(patch)?

-- 
Regards
Szymon
Reply all
Reply to author
Forward
0 new messages