A Mac/Firefox curiosity

Posted by: gbeer

A Mac/Firefox curiosity - 27/12/2009 22:33

Typically I boot the MBP and as soon as I get around to it start Firefox. Sometimes FF starts with one bounce of the icon in the dock, other times it takes 5-6 bounces. Safari always starts on the first bounce.

So why does FF have such a variability in it's start time?
Posted by: mlord

Re: A Mac/Firefox curiosity - 27/12/2009 23:01

Firefox "calls home" on startup. If the internet (wireless, whatever) connection isn't fully "up", then it takes longer..

smile
Posted by: mlord

Re: A Mac/Firefox curiosity - 27/12/2009 23:05

Mmmm.. actually, I'd always assumed that Firefox was simply "calling home" at startup.

So just now, I started WireShark before Firefox to find out. It appears to be doing DNS lookups during startup, for a large number of my bookmarks.

Cheers
Posted by: gbeer

Re: A Mac/Firefox curiosity - 27/12/2009 23:25

Thanks smile Me, going now, to investigate the options in about:config.
Posted by: tfabris

Re: A Mac/Firefox curiosity - 28/12/2009 17:55

I'm pretty sure those DNS lookups are part of its initial cache filling (it does that load-ahead trick for links I seem to recall).

Are you certain that the DNS lookups are the reason it starts slowly, though? I'd expect they'd make that sort of thing a non-blocking background thread.
Posted by: tfabris

Re: A Mac/Firefox curiosity - 28/12/2009 17:58

Speaking of slow firefox startup, I have the following issue:

When I begin typing in the navigation bar, the very first time I do it, the keyboard is slow to respond.

For instance, if I boot up the computer, and the first thing I do is open Firefox, then I type "empegbbs.com", after I press the first "e" there is a long pause before the rest of the letters appear.

It appears to be trying to scan through my browser history for populating the automatic drop-down list that appears when I begin typing. As soon as that list is loaded and appears, then firefox starts responding normally again.

Does anyone else get this, and is there a way to optimize this feature (perhaps an about:config entry) that makes the drop-down list into a non-blocking operation?
Posted by: msaeger

Re: A Mac/Firefox curiosity - 28/12/2009 18:06

I don't get that but I have it set to not keep any history. If I start typing empegbbs.com it does show stuff I have bookmarked but it doesn't slow down it comes up as soon as I type the e.
Posted by: tfabris

Re: A Mac/Firefox curiosity - 28/12/2009 18:18

Originally Posted By: msaeger
I don't get that but I have it set to not keep any history. If I start typing empegbbs.com it does show stuff I have bookmarked but it doesn't slow down it comes up as soon as I type the e.


See, I'm the opposite. Now I actually use that drop-down list in place of bookmarks. I don't keep bookmarks any more, I just use that history list. That list gets sorted according to usage, so even if I have a bunch of items in my history that start with "e", I always get the EmpegBBS when I type an e. So that makes it really useful in the long run. And it's surprising how well-distributed through the alphabet my favorite sites are. P gets me Penny Arcade, X gets me XKCD, B gets me Blue's News, etc. And for the rest, two letters is usually enough.

I just wish it didn't freeze for a long time on its first usage. (Actually, I don't mind it taking a long time, I just can't stand the fact that it blocks my typing input thread while it's spooling up.)

I suppose that my dependence upon the list is the reason it's slow on first usage. Probably takes some doing to sort through the history data.
Posted by: msaeger

Re: A Mac/Firefox curiosity - 28/12/2009 18:45

Yeah i'm probably just stupid but I still don't want my browsing history on there for anyone to see. I'm pretty much the only one who uses the computer and I don't look at anything that would get me in trouble with anyone.
Posted by: Anonymous

Re: A Mac/Firefox curiosity - 28/12/2009 18:56

Perhaps it's installing an update.
Posted by: gbeer

Re: A Mac/Firefox curiosity - 29/12/2009 20:07

Originally Posted By: tfabris
Speaking of slow firefox startup, I have the following issue:

When I begin typing in the navigation bar, the very first time I do it, the keyboard is slow to respond.

For instance, if I boot up the computer, and the first thing I do is open Firefox, then I type "empegbbs.com", after I press the first "e" there is a long pause before the rest of the letters appear.

It appears to be trying to scan through my browser history for populating the automatic drop-down list that appears when I begin typing. As soon as that list is loaded and appears, then firefox starts responding normally again.

Does anyone else get this, and is there a way to optimize this feature (perhaps an about:config entry) that makes the drop-down list into a non-blocking operation?


I don't see that, but I have several url related config options set:

browser.search.suggest.enabled false
keyword.enabled false
browser.urlbar.default.behavior 2 < masking details

edit: and also this
browser.urlbar.autocomplete.enabled false
Posted by: peter

Re: A Mac/Firefox curiosity - 29/12/2009 20:32

Originally Posted By: tfabris
Does anyone else get this, and is there a way to optimize this feature (perhaps an about:config entry) that makes the drop-down list into a non-blocking operation?

I certainly get a slightly longer delay the first time in a session I use it: the disk light goes on, and the UI thread appears to be blocked. Which is odd on the face of it, as all the rest of the time that feature is very clearly non-blocking. What I suspect is going on, is that at that moment it scans the whole history database (on Unix, ~/.mozilla/firefox/<i>profile</i>/places.sqlite), pulling in all the pages and generating so much disk I/O that when the UI thread then hits a non-resident page and pages it in, it has to wait in an I/O queue.

A defragmenter would probably help, but apart from that what you really want is for the history-database thread to have lower I/O priority than everything else -- on Linux this is ionice(1) or ioprio_set(2), but I don't know whether Windows or Mac has equivalent settings.

Peter
Posted by: msaeger

Re: A Mac/Firefox curiosity - 29/12/2009 20:38

A somewhat related question I have is can I stop google or whatever from stealing the cursor on startup ? If I click on the address bar too quick when starting the cursor goes back to google in the middle of the address I am trying to enter.
Posted by: wfaulk

Re: A Mac/Firefox curiosity - 29/12/2009 21:33

Set your home page to "about:blank" instead of some web site that you probably don't use anyway.
Posted by: wfaulk

Re: A Mac/Firefox curiosity - 29/12/2009 21:40

I might suspect "Live Bookmarks", too.

Or not.
Posted by: msaeger

Re: A Mac/Firefox curiosity - 29/12/2009 21:58

I have it set to google which I do frequently use. I would have to keep track to see if I do a search or type in an address as the first thing I do after starting firefox.
Posted by: tfabris

Re: A Mac/Firefox curiosity - 29/12/2009 22:09

You're aware that:

1. You can activate a google search box next to the address bar box (in fact it's there by default IIRC), so that you get the same benefit of having a google search available without having to set your home page to google?

2. Typing a search phrase into the address bar also launches a google search, so that you get the benefit without having to have either of the above things?
Posted by: wfaulk

Re: A Mac/Firefox curiosity - 29/12/2009 22:37

Or, even better, dump both and set up keyword searches for Google and all the other sites you frequently search on. I have Google's keyword set to "g" so if I want to search for widgets, I can just type "<Ctrl-L>g widgets<Enter>" from any browser window. Or change the <Ctrl-L> to a <Ctrl-T> to open a new tab, which doesn't waste bandwidth loading a page I don't need and doesn't steal my focus from the URL bar.

I also frequently use keywords for Wikipedia, IMDB, Youtube, and a bunch more.
Posted by: msaeger

Re: A Mac/Firefox curiosity - 29/12/2009 22:43

Yeah I have the google search next to the address bar but I still want google as my home page i'm a crotchety old man I guess. When I type a random word into the address bar it appears to do a "i'm feeling lucky" google search which is kind of neat.

I did figure out how to stop it from stealing the cursor Link i'll see which way I like it better.

No I did not ask the question in 2008 smile
Posted by: Roger

Re: A Mac/Firefox curiosity - 30/12/2009 05:48

Originally Posted By: peter
what you really want is for the history-database thread to have lower I/O priority than everything else -- on Linux this is ionice(1) or ioprio_set(2), but I don't know whether Windows or Mac has equivalent settings.


It has something similar since Windows Vista.
Posted by: tfabris

Re: A Mac/Firefox curiosity - 14/01/2010 17:08

Originally Posted By: gbeer
I have several url related config options set:

browser.search.suggest.enabled false
keyword.enabled false
browser.urlbar.default.behavior 2 < masking details

edit: and also this
browser.urlbar.autocomplete.enabled false



Following up on this:

I've been able to significantly speed up my Firefox URL bar on first use by setting the following settings:

Code:
browser.urlbar.default.behavior      1
Browser.urlbar.search.chunkSize     25
Browser.urlbar.search.timeout        5
Browser.urlbar.maxRichResults        4


I'll probably fiddle with those settings more. Details of what all the options do are here:
http://kb.mozillazine.org/About:config_entries
Posted by: tonyc

Re: A Mac/Firefox curiosity - 16/01/2010 05:32

As luck would have it, this extension popped up in my RSS reader tonight. Seems to work as advertised for me -- fetching of the URL bar suggestions and searching of history items is noticeably faster.

I also happened upon this little tip earlier in the week. For keyword search bookmarks, you can use some simple javascript to go to different URLs depending on whether you supply a keyword or not. e.g. for Wikipedia, I have keyword "wp" set to:

javascript:if('%s')%20location.href='http://en.wikipedia.org/wiki/Special:Search?search=%s';else%20location.href='http://en.wikipedia.org/wiki/Main_Page';

So, if I just type "wp" I go to the main wikipedia page, but if I supply a keyword, it searches for it. Soemthing I always thought would be nice but didn't realize was possible until now.
Posted by: tfabris

Re: A Mac/Firefox curiosity - 16/01/2010 20:29

DUDE.
Posted by: tman

Re: A Mac/Firefox curiosity - 16/01/2010 22:08

Originally Posted By: tonyc
I also happened upon this little tip earlier in the week. For keyword search bookmarks, you can use some simple javascript to go to different URLs depending on whether you supply a keyword or not. e.g. for Wikipedia, I have keyword "wp" set to:

javascript:if('%s')%20location.href='http://en.wikipedia.org/wiki/Special:Search?search=%s';else%20location.href='http://en.wikipedia.org/wiki/Main_Page';

So, if I just type "wp" I go to the main wikipedia page, but if I supply a keyword, it searches for it. Soemthing I always thought would be nice but didn't realize was possible until now.

Doesn't the search engine keyword feature do this already? I guess it doesn't do the if no search terms then go to main page part.
Posted by: wfaulk

Re: A Mac/Firefox curiosity - 18/01/2010 13:18

Correct. That's the part he was fixing.