Page 1 of 4 123 ... LastLast
Results 1 to 10 of 40

Thread: How-to: Firefox speedup using SQLite VACUUM command

  1. #1
    Join Date
    Oct 2007
    Location
    Zagreb, Croatia, Europe
    Beans
    513
    Distro
    Ubuntu 9.10 Karmic Koala

    Lightbulb How-to: Firefox speedup using SQLite VACUUM command

    my friend of mine found out that Firefox can run faster if it's database is purged of empty entries. Firefox database is using SQLite to manage its database

    you'll need:
    1)SQLite >=3.0
    you can check your version by typing in CLI
    Code:
    sqlite3
    (exit typing .exit)
    if you don't have it you can obtain it here: http://www.sqlite.org/ or with
    Code:
    sudo apt-get install sqlite3
    2)you'll need this script:
    Code:
    #!/bin/bash
    
    username=$(whoami)
    proc="$(ps aux | grep $username | grep -v $0 | grep firefox | grep -v grep)"
    if [ "$proc" != "" ]
    then
            echo "shutdown firefox first!"
            exit 1
    fi
    
    curdir=$(pwd)
    
    for dir in $(cat ~/.mozilla/firefox/profiles.ini | grep Path= | sed -e 's/Path=//')
    do
            cd ~/.mozilla/firefox/$dir 2>/dev/null
            if [ $? == 0 ]
            then
                    echo "i'm in $(pwd)"
                    echo -e "    running...\n"
    
                    for F in $(find . -type f -name '*.sqlite' -print)
                    do
                            sqlite3 $F "VACUUM;"
                    done
    
                    echo -e "done in  $(pwd) ...\n"
            else
                    echo -e "\n    !!!! Nisam uspio uci u direktorij $dir, preskacem ga !!!!\n"
            fi
    done
    echo "Job finished";
    
    cd $curdir
    use gedit (or any other text editor) to paste text in it,then save it in your home folder. Open your home folder, right-click on it, select properties. Then select Permissions tab and check the "Allow executing file as program" click Close.

    Then close Firefox and run your script from terminal using ./name_of_script

    when script done it's work start Firefox and you should feel the difference!
    Dear god, I would like to file a bug report.

    increase Firefox startup speed and speed of Smart Location Bar:
    http://ubuntuforums.org/showthread.php?t=1088094

  2. #2
    Join Date
    Jun 2007
    Beans
    53

    Re: How-to: Firefox speedup using SQLite VACUUM command

    This worked really good for me, thanks.

  3. #3
    Join Date
    Feb 2008
    Location
    Transilvania
    Beans
    152
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: How-to: Firefox speedup using SQLite VACUUM command

    Yes, I really see a difference!Thanks!

  4. #4
    Join Date
    Mar 2006
    Location
    Denmark - Copenhagen
    Beans
    2,165

    Re: How-to: Firefox speedup using SQLite VACUUM command

    Seams to have done a bit here too..

    What really made my browsering faster was adding:
    export MOZ_DISABLE_PANGO=1
    to the end of .bashrc.

    Code:
    gedit .bashrc
    And the line at the end

  5. #5
    Join Date
    Feb 2008
    Beans
    Hidden!
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: How-to: Firefox speedup using SQLite VACUUM command

    In what area should I be seeing speed increase? Page loading? Startup? I don't see any difference but I don't know what I should be looking for.

  6. #6
    Join Date
    Jun 2008
    Location
    Right behind you stalking
    Beans
    126
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How-to: Firefox speedup using SQLite VACUUM command

    Will this work with Firefox 2?

  7. #7
    Join Date
    Jan 2009
    Beans
    10
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: How-to: Firefox speedup using SQLite VACUUM command

    whoa!!! very nice how-to bro..tried it and it worked, when i open firefox i already felt the power

    awesome!!!

  8. #8
    Join Date
    Sep 2006
    Beans
    3,165
    Distro
    Ubuntu Karmic Koala (testing)

    Re: How-to: Firefox speedup using SQLite VACUUM command

    Working perfect

  9. #9
    Join Date
    Oct 2007
    Location
    Zagreb, Croatia, Europe
    Beans
    513
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How-to: Firefox speedup using SQLite VACUUM command

    Quote Originally Posted by stormtrooprdave View Post
    In what area should I be seeing speed increase? Page loading? Startup? I don't see any difference but I don't know what I should be looking for.
    it affects on Startup, Smart Location Bar, History, bookmarks...

    Quote Originally Posted by tehforum View Post
    Will this work with Firefox 2?
    Firefox 2 also uses SQLite databases so it should work
    Dear god, I would like to file a bug report.

    increase Firefox startup speed and speed of Smart Location Bar:
    http://ubuntuforums.org/showthread.php?t=1088094

  10. #10
    Join Date
    Nov 2007
    Location
    Bangalore,Karnataka,India
    Beans
    93
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How-to: Firefox speedup using SQLite VACUUM command

    Should I run the script before starting every new session of Firefox?

Page 1 of 4 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •