Come ha già detto Gioxx è possibile ottimizzare i DataBase SQLite usati da Firefox 3.x per avere un avvio piu’ veloce del browser.
Gioxx ha descritto su come farlo in Windows, io vi mostrerò come farlo su Mac e Linux.
Per prima cosa chiudete firefox, non deve assolutamente essere in esecuzione!
Ora potete aprire un Terminale ed entrare nel vostro profilo:
Linux: ~/.mozilla/firefox/xxxxxxxx.default/
Mac: ~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/
Switch@bimbo:~$ cd Library/Application\ Support/Firefox/Profiles/xxxxxxxx.default/
Switch@bimbo:~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default$ ls -lah *.sqlite
-rw-r–r–@ 1 Switch staff 7,0K 19 Mag 2008 content-prefs.sqlite
-rw-r–r–@ 1 Switch staff 511K 16 Lug 08:49 cookies.sqlite
-rw-r–r–@ 1 Switch staff 203K 15 Lug 22:14 downloads.sqlite
-rw-r–r–@ 1 Switch staff 3,0K 3 Lug 21:09 dta_queue.sqlite
-rw-r–r–@ 1 Switch staff 119K 15 Lug 22:02 formhistory.sqlite
-rw-r–r–@ 1 Switch staff 2,0K 11 Giu 10:22 permissions.sqlite
-rw-r–r–@ 1 Switch staff 17M 16 Lug 08:45 places.sqlite
-rw-r–r–@ 1 Switch staff 2,0K 29 Mar 2008 search.sqlite
-rw-r–r–@ 1 Switch staff 70K 16 Lug 08:07 signons.sqlite
-rw-r–r–@ 1 Switch staff 4,0M 15 Giu 2008 urlclassifier2.sqlite
-rw-r–r–@ 1 Switch staff 2,0K 18 Ott 2008 webappsstore.sqlite
Ora useremo il comando VACUUM di sqlite3 per ottimizzare il db
Switch@bimbo:~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default$ for F in *.sqlite; do sqlite3 $F “VACUUM”; done
Switch@bimbo:~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default$ ls -lah *.sqlite
-rw-r–r–@ 1 Switch staff 7,0K 16 Lug 08:58 content-prefs.sqlite
-rw-r–r–@ 1 Switch staff 373K 16 Lug 08:58 cookies.sqlite
-rw-r–r–@ 1 Switch staff 157K 16 Lug 08:58 downloads.sqlite
-rw-r–r–@ 1 Switch staff 3,0K 16 Lug 08:58 dta_queue.sqlite
-rw-r–r–@ 1 Switch staff 47K 16 Lug 08:58 formhistory.sqlite
-rw-r–r–@ 1 Switch staff 2,0K 16 Lug 08:58 permissions.sqlite
-rw-r–r–@ 1 Switch staff 6,5M 16 Lug 08:58 places.sqlite
-rw-r–r–@ 1 Switch staff 2,0K 16 Lug 08:58 search.sqlite
-rw-r–r–@ 1 Switch staff 69K 16 Lug 08:58 signons.sqlite
-rw-r–r–@ 1 Switch staff 2,7M 16 Lug 08:58 urlclassifier2.sqlite
-rw-r–r–@ 1 Switch staff 2,0K 16 Lug 08:58 webappsstore.sqlite
L’esempio è su un Mac ma è esattamente uguale a Linux, cambia solo il percorso del profilo.
In alcune distribuzioni Linux, sqlite3, non è presente per cui dovete scaricarlo dai repository ufficiali della vostra distro.
Come potete notare il DB piu’ “ciccione” di 17MB è stato compresso fino a 6,5MB per cui piu’ del 50%!
Commenti Recenti