Sări la conţinut

[Linux] Firefox performance tip

10 ianuarie, 2009

Just found this and thought i had to share it:

Firefox insists on doing huge amounts of I/O when closing, as well as act slow when using the awesomebar, try the following (close down Firefox completely first):

for f in ~/.mozilla/firefox/*/*.sqlite; do sqlite3 $f 'VACUUM;'; done

It’s harmless, no data will be lost: it compacts your SQLite databases. Noticable gains for me.

[Source]

About these ads
18 comentarii
  1. 10 ianuarie, 2009 22:10

    works, thanks

  2. 10 ianuarie, 2009 22:15

    You’re welcome.

  3. deepak permalink
    10 ianuarie, 2009 22:26

    Can you explain how to do this?

  4. remu permalink
    10 ianuarie, 2009 22:34

    There is a program with the command. Make sure that the single-quotes around VACUUM are correct. The command if copy and pasted doesn’t work. Not for me anyway. The Following command worked for me:

    for f in ~/.mozilla/firefox/*/*.sqlite; do sqlite3 $f ‘VACUUM;’; done

  5. ChrisBookwood permalink
    10 ianuarie, 2009 22:34

    I can’t get it to work. I get error:

    SQL error: near “‘VACUUM”: syntax error
    bash: ’: command not found

  6. ChrisBookwood permalink
    10 ianuarie, 2009 22:37

    You are right, remu, when I typed it in, instead of copy & pasting, it worked.

    Thanks!

  7. 10 ianuarie, 2009 22:39

    I don’t know why you can’t copy/paste because that’s exactly how i did it. Maybe wordpress modified it :|

    I edited it and used some code tags, hope it works now…

  8. Kevin permalink
    11 ianuarie, 2009 1:17

    Does this accomplish the same as using the compact database feature of SQLite Manager?

  9. mcwood permalink
    11 ianuarie, 2009 9:07

    copy/paste to a notepad. after that copy paste from the notepad. It should work. copy paste directly u get this message”SQL error: near “‘VACUUM”: syntax error
    bash: ’: command not found”.

  10. Jan permalink
    24 ianuarie, 2009 10:14

    Anyone know’s a similar trick for windows?

  11. 24 ianuarie, 2009 10:30

    I don’t think Windows uses MSQLite databases for Firefox :)

  12. Broderick permalink
    27 martie, 2009 19:55

    I’m not sure I follow this.

    Does one simply run this in the command line once and then your settings are changed so the MSQLite databases are cleared every time?

    Or do you need to do this each time you close Firefox?

    Or does one need to put this into a file or script somwhere?

  13. 27 martie, 2009 19:58

    You can have it to start once you login (startup). You will notice that the awasomebar is a lot more responsive and also Firefox will close down much faster than before.

  14. 28 martie, 2009 5:21

    `for x in …` is generally a bad idea. You should use `find` instead :)

    > find ~/.mozilla/ -iname ‘*.sqlite’ -execdir sqlite3 {} ‘vacuum;’ \;

  15. 28 martie, 2009 11:12

    Why? Well, it worked ok with ‘for’ too… :-? ?

  16. MuffinTop permalink
    28 martie, 2009 15:37

    Okay, now my search bar doesn’t work and I can’t auto-complete when I press Ctrl-Enter in the address bar.

  17. 28 martie, 2009 15:40

    You must have entered something else because i have

    for f in ~/.mozilla/firefox/*/*.sqlite; do sqlite3 $f ‘VACUUM;’; done

    on startup for a few months now and everything is ok!

    Have you completely close Firefox first?

  18. 17 decembrie, 2009 20:51

    I guess this is the same as the Vacuum option in BleachBit? http://bleachbit.sourceforge.net/

Comentariile nu sunt permise.

Follow

Get every new post delivered to your Inbox.

Join 46 other followers

%d bloggers like this: