Donation Goal
Donate Now Goal amount for this year: 799 USD, Received: 100 USD (13%)
Please donate to help support this website. The funds will be used to purchase owned license of LiteSpeed Web Server Enterprise (2-CPU). It provides superior performance in terms of raw speed, scalability and anti-DDoS capabilities.

Firefox 3.5 Slow and Hangs After Typing a Few Letters in URL Location Bar

Posted By Raymond In Category: Computer

Aug
15
2009

Firefox is simply the best web browser. In my opinion, no other browser such as Opera, Internet Explorer, Chrome or Safari can beat Firefox. I’ve been using it for a very long time now and am very satisfied with it. However the only problem that I face with Firefox browser is it gets annoyingly slow after using it for a few months. Every morning when I launch Firefox and type a couple of letters in the URL location bar, it hangs for a while, then only it shows a bunch of suggested links. Even when I close Firefox, it takes a while for the firefox.exe process to be terminated.
firefox slow
I figured that since Firefox hangs when I am typing in the URL, it could probably be that I have a huge list of history. My Firefox 3 has all the default configurations and I never change anything. By default Firefox remembers my browsing history for 90 days which means that Firefox will remember the URL of the site that I visited for the past 3 months.

So I did a little investigation on my Firefox history list to check if it is the culprit that causes my Firefox to respond slowly.


I downloaded a free tool called MozillaHistoryView which reads the history data file of Firefox Web browser, and displays the list of all visited Web pages in the last day. Again it took quite a while for MozillaHistoryView to load the history file and I was shocked to see that I have 72184 links in my Firefox history! If you divide 72184 with 90 days, I visit an average of 800 websites a day, 33 every hour! Beat that and you’ll be the next raymond.cc :P (I’m just joking)

My idea of fixing this Firefox slow respond problem is to export all the history into a text file so I can search for it at a later time when I need it and then delete the Firefox history file to start all over again. Starting in Firefox 3, both the bookmarks and browsing history are stored in the places.sqlite file, located in the Firefox profile folder. Since the bookmark is also saved in the same file as history, I will need to backup my bookmarks as well. When I am done with that, I will try lowering down the number of days from 90 days to 45 days for Firefox to remember my browsing history.

Backup Firefox Bookmarks
1. Click Bookmarks from the menu bar and select Organize Bookmarks.
2. Click the Import and Backup button and select Backup.
3. Save the bookmark backup .json file to a location that you remember on your hard drive.
export firefox bookmark

Export Firefox Browsing History
1. Download MozillaHistoryView and run it.
2. You can either export it to text or HTML format. For HTML format, go to View and select “HTML Report – All Items”. For text file, go to Edit and click on Select All. Then go to File and select Save Selected Items.

Delete Firefox Browsing History File (places.sqlite)
1. Make sure that Firefox is not running
2. Go to RUN, type %appdata%/Mozilla/Firefox/Profiles/ and hit Enter.
3. You should see a folder with random letters and numbers followed by a .default (eg; 89ns5tbp.default)
4. Go in to the folder and rename the places.sqlite file to places.sqlite.bak
rename places.sqlite
Note: I noticed that clearing the “Browsing History” from Firefox doesn’t make the size of places.sqlite file smaller. That’s why I resort to letting Firefox re-create a new places.sqlite file.

Run Firefox now and you should notice that Firefox no longer slow or hangs. To restore your bookmarks, go to Bookmarks in your menu bar and select Organize Bookmarks. Then click the Import and Backup button > Restore > Choose File. Select the file that your backed up earlier.

Lower Firefox History Size
1. Go to Tools > Options..
2. Click on the Privacy button and click on the drop down menu for Remember History. Select “Use custom settings for history”.
3. Set the “Remember my browsing history for at least XX days” to 45 and click OK.
limit firefox history size

Firefox developers should set a lower number of days for Firefox to remember the browsing history as default. 90 days is probably way too high and can cause the browser to crawl even on a Windows XP computer with 2GB of RAM.


Related posts:
  • Automatically Backup Firefox Bookmarks
  • Firefox Updated Tab Auto Opens Whenever You Start Firefox
  • How to delete individual URLs from Firefox address bar history
  • Enable Firefox Incompatible Add-Ons and This add-on is for older versions of Firefox
  • Backup Mozilla Firefox Profiles
    • ankur

      Excellent post! This is what called innovative and fresh.

    • ziad

      Mr.Raymond. it is may be a bit late but I want to thank you for dr.web and online armor.
      together they are very strong thing and if we add also zemana antilloger it is really the best defence all together.sorry for my English.Good day or night for you.

    • swarup1987

      Its a very interesting post & it makes very firefox fast & end only disadvantage.

    • Milad

      thanks ray.
      FEBE is a firefox addons that allow you to back up everything in firefox.
      I think that this addons is really great.
      hope useful for you and eveyone.
      thanks again.

    • Vinay

      Did it solve the problem? You didn’t mention that. Anyways thanks for the useful info.

    • http://www.raymond.cc/ Raymond

      Vinay, yes it solved the problem. Firefox is no longer slow when I type a few letters in History and closing Firefox terminates the process nearly immediately.

    • David

      Good job Raymond!

    • fsr

      How complicated Raymond, how about changing settings for History Cleaning? Options>Privacy>Settings (put a checkmark on Clear History when Firefox Closes and select whatever you wish to clean). Whenever you quit a session, Firefox does the cleaning for you.

    • http://www.raymond.cc/ Raymond

      fsr, I won’t want Firefox to clear all the sites that I’ve been to, so that option doesn’t solve the problem.

    • Abdullah

      well I don’t use firefox so much simply because it starts up slower than both IE and chrome … and Yes this is the only thing that I care about .. speeeeeeeeeeed

    • fsr

      I reproduced your exact steps this seems more an sqlite issue, fragmentation or something (how large was your places.sqlite?)…maybe that procedure is the more simple =( for the average user after all.

    • Arvin

      nice info. there
      thanks

    • Mohammad

      I figured out another cause and solution:
      Since places.sqlite is rapidly resizing, it gets fragmented very quickly(Once it was more than 1000 fragments for me)
      Defragmenting this file will speed up reading it at least two times.

    • govind

      which is the most recommended browser for low speed internet connections ( dial up )?

      any suggestions ?

    • DAG

      Raymond you always have an interesting post which I learn a lot from.
      I have been using firefox for years but this 3.5 version has caused me many problems. Firefox kept crashing, when I tried opening a new site it went down.
      I had written to Mozilla support about this problem over a week ago and as of yet no answer from them.

      The only way I solved it was by going to http://www.filehippo.com and downloading an older version.
      After removing 3.5 and installing the older version it had worked excellent just like it always did. If you check out the support forums for firefox there are a lot of users having problems. Too bad because it is the best browser.

    • juhani

      Well, Raymond… Firefox is good but Opera is really fast and I’m just waiting fo version 10…at the moment it’s 9.5 beta3…but thanks for a nice post.

    • tobytutz

      I have also discovered the mass of history – However, what I do to solve the problem is – in firefox browser, click on >History >Show all history – using keyboard click Ctrl> a > to highlight all, then >delete.

      This clears all firefox history.

      Hope this helps!

    • Monkey

      Hi. IE users should try Maxthon

      http://www.maxthon.com

    • http://ucpro.my megablue

      Actually an easier solution would be setting
      1. Lower Firefox History Size (let say, to 30 days)
      2. download sqlite3 from http://www.sqlite.org/download.html
      3. copy sqlite to your Firefox profile folder
      4. run “sqlite3 places.sqlite VACUUM”
      5. done.

    • sunnytimes

      you will be happy to know that this issue is fixed in the latest nightly’s and will be in soon, most likely 3.6 :]

    • Peter

      Thanks

    • george

      after i did the steps…everyting was fine…after a reboot my firefox was as if it was newly installed no saved passwords no booksmakr no nothing :(

    • Shajan

      Thanks Raymond, This was really very useful. I deleted the file – 154 MB, and the firefox is much faster now, and terminates instantly. Till now, I had to hard terminate firefox. Thats resolved now. Thanks ! Shajan.

    • http://www.urssiva.com Siva

      Thnks Ray .

      I dont know , most times u post articles / tutorial , which i would like to have or desperate to have….

      can u also tell us why FF hangs when playing games in facebook such as mafia wars ?

      more over a common problem with FF is that u keep FF running for few hours , it will start to freeze / hang intermittently , i have searched for that in many forums and sites .. but still could get a good answer. If ray or anyone can help me on that issue , it would be great.

      anyway thnks ray ,

    • Cappella

      This is not a Firefox problem, but more with sqlite issue. The reason why it is slow is because sqlite has to fetch the queries, and right now it cannot handle large pool of links (>50K) in a manner that is responsive. I have about 120K links, and I let it runs it through the first time. Once the DB has been partially cached subsequent searches are faster.

    • steve

      Thanks ray it really helps a lot. its great

    • vikky

      However, for me its always been opera – nothing comes even close to it.

    • Loy

      Thanks a lot!! Firefox loads much faster now..

      Wonder where you get all these wonderful ideas from..keep up the good work!!

    • Siva

      @Cappella and to Ray ,

      yes its SQLITE issue..

      i used FEBE Add-On and Xmark to back up all the bookmark and password. and as ray told , renamed the places.sqlite file and started the FF , now its really smooth..

      Thanks a lot , now FF much better

    • denis

      If you need to tweak or manage SQLite files, you can rely on SQLite manager (add-on for Firefox).

      https://addons.mozilla.org/en-US/firefox/addon/5817

      Use “connect to database” to open a SQLite file and then you can compact the file or do whatever you want with it (including deleting specific records)

    • http://GreatAdviceThanks! Dan

      Great advice, thanks so much! This was actually the only reason I’ve been using Chrome instead of Firefox for the last few months. Maybe it’s time for me to go back… Thanks again!

    • longman07

      thanks ray,

      i love firefox, but hate the problem you mentioned… just installed chrome this week but definitely i’ll use firefox again…

    • Dem

      Raymond – firefox works great on Linux. It saves 90days history there too without any problems. It’s also an issue with the operating system on the way firefox handles the sqlite file in windows.

    • Nina

      I’ve always liked Firefox and never had problems with it until lately…it hangs, lags, freezes…reading this post I can’t believe U have to go thru all that nonsense just to get Ur browser to work properly…not everyone wants to sit there fiddling around with…’The Browser’.

    • Gerrit

      Well, spotted the culprit, nice. However, the main question for me is, why do they use such a crappy database to store data in the first place? They could use a real database software instead of this SQLITE which is too slow when you fill it with more than few lines of data?

      Or maybe they just need to learn how to use it properly?

    • zam

      thank raymond.

    • Dave

      FF 3.5 was supposed to be the fastest version ever…., yeah right!!! FF 3.0 was faster than this.

      For me, the idea of having a browsing history, is having a browsing history, so that’s why I even set it to a very long time, so that the browser may still remember when I was 3 years ago, when I start typing the name of a site I more or less remember I was 3 years ago. v3.0 did it perfectly. I thought I was getting like a Ferrari with 3.5, but it seems some one throw something really bad in the gas tank.

      You should be reading this:

      http://weblogs.asp.net/fbouma/archive/2009/07/09/the-firefox-3-5-fiasco.aspx

      https://support.mozilla.com/tiki-view_forum_thread.php?comments_parentId=381674&forumId=1

    • Shail

      Firefox takes a lot of Time to load when it is run for the first time. Today I will show you a simple way to reduce this loading time and thus turn your slow firefox into fast firefox.

      You can slash Firefox’s slow load time by compressing the DLLs and executables. There are many choices for compression but I suggest you use UPX which is free, efficient and time proven.

      fasterfox1. Download UPX from http://upx.sourceforge.net/#download
      2. Unzip upx.exe into your Firefox installation folder which is normally C:\Program Files\Mozilla Firefox.

      3. Make sure Firefox is not running then shell to a command prompt in the Firefox installation directory.

      4. Type in the following command in a single line and hit return:

      for %v in (*.exe *.dll components\*.dll plugins\*.dll) do upx “C:\Program Files\Mozilla Firefox\%v”

      5. If on some later occasion you want to unpack the files, just type in the command above but add the decompression switch “-d” after “do upx.”

      That’s it; enjoy the difference!

    • enki

      I was having this issue and fixed it easily once I understood that the issue was file fragmentation. (My places.sqlite is only 12MB, and it was going very slowly)

      1) Close Firefox.
      2) Cut places.sqlite and paste it on a different drive.
      3) Cut places.sqlite and paste it back to its original location.

      This will essentially defragment only this file. If you don’t have more than one drive, you could add places.sqlite to an archive, delete the original, and then extract it.

    • Mike

      I guess I’m a knuckle-dragger, but I fink Firefox 3.5.x so annoyingly slow at times that it’s unusable. Since I just want to use it, not turn it into a PhD thesis, I solved my problem another way. I use Opera as my default browser now. True, it doesn’t have all the nifty features, but it does one thing that Firefox doesn’t: IT WORKS.

    • http://mine me

      py places file was 17MB. Its now down to 600kb again. The funny thing: i didn’t have to import the bookmarks again. Anyway its finally working again.

      thx raymond!

    • Costa

      Great post ! Thanks a lot. I had the same problem !

    • Tom

      Like a lot of you, I switched to Chrome because of this issue alone. It’s sad. And one of the major drawbacks to free software in general: there’s nobody in sight to take the blame for it or responsibility for fixing it. And now the one or two guys who did the faulty work on this section of code will be off surfing or doing real jobs. And nobody can complain because we haven’t paid a cent, only built web histories and password stores, learned shortcuts, established a plugin repertoire, etc. So there is a cost to free software, as it turns out. Wasted time.

      As for the problem, clearly it’s just bad engineering. Even if the history database is slow, searching it should never have been allowed to steal CPU cycles from the interface. Chrome clearly solves the problem correctly by prioritising input. Chrome is also free though, so don’t expect it to be a life partner either.

      The only browser we ever had reason to trust was IE, and sure enough it’s soldiering on. I hear people are switching back.

    • Matt

      WTF Tom? Switching back to IE…for trust reasons? You’re completely insane.

      Browser vulnerabilities out the wazoo, willful defiance of standards, ActiveX/OS integration, monopolistic practices, the worst render and JS execution speeds, and a 3-5 year feature lag. And you *trust* that?

      Quit trolling.

    • http://lucashutmacher.com/ Lucas

      hey, great post. After looking at what was going on, i realized it’s really a matter of finding something to compact all those sqllite databases. I ran across this on LifeHacker a while back when looking for something work over my registry – CCleaner. it’s free & all that and has an option specifically for compacting the firefox databases & it works like a champ.

      Just an fyi!!!

    • http://www.searstower.org/rkrause/virtualhosts.html Randall Krause

      Matt wrote:
      “WTF Tom? Switching back to IE…for trust reasons? You’re
      completely insane. ”

      Your response is hilarious. I installed FF last year (after being a devout IE fan for nearly half a decade but finally giving into the trend). Well I picked up a virus within the FIRST week. And yet using IE, I never was infected with a single trojan — only some random harmless spyware which paled in comparison to the virus that forced me to have to literally buy an entirely new hard drive because even a low-level format couldn’t remove it. So please don’t talk about FF like it’s so flawless. No browser is perfect. Just the fact FF is so renowned for being slow and eating CPU cycles shows it has its own host of problems. My two cents.

    • jerry

      I only recently installed this, but I think it helped. (an addon that lets you change the URL bar auto-complete behavior (e.g. back to what it was in ff 2)).
      https://addons.mozilla.org/en-US/firefox/addon/7637

    • Bob

      Unfortunatley, Firefox does not provide a way to do what you want in the Preferences menu. Didn’t you notice the wording of the preference? “Remember my browser history for AT LEAST __ days?” (emphasis mine)

      By telling Firefox that you want your browser history for at least 45 days, it will still continue to keep the history as long as it wants. You need to set a maximum value, and you can only do that with about:config, user.js, prefs.js, etc.

      You need to set the following values to set a maximum history:

      user_pref(“browser.history_expire_days”, 45);

      user_pref(“browser.history_expire_days.mirror”, 45);

    • http://www.myboni.co.cc Boni

      This is good, but is there anyway to make it faster even not deleting the history… i make it to 999 days, and it is so slow… I want all my history is saved forever so i can use it. having many history is have a good side, like if you forget something that you have visited and try too google it and found nothing, you just have to try to type the keyword in the address bar to see the site history you have been visited before…

      But thanks for this tips, if i have facing a very bad one i will using this tips…

    • Effie

      I could not type anything without it hanging. I have a Mac and the MozillaHistoryView only works with Windows. But I used the backup procedure for my bookmarks and cleared all history, cache and cookies. Restarted Firefox and restored the bookmarks. Wow it doesn’t hang anymore!

      Thank you.

    Copyright © 2005-2012 - Raymond.CC Blog