This can be fixed via:
- http://apple.stackexchange.com/questions/188726/in-safari-there-is-a-lag-for-the-open-location-and-new-tab-shortcuts
- https://gist.github.com/WojtekKruszewski/3d5ff7f908a180b87498
But it breaks an important OS X function.
Many OSX upgrades can corrupt Safari's history DB.
Result: a slow as heck address bar and sometimes sluggish new tab open action.
It seems Safari uses a simple SQLite3 db for storing history - it just needs some clean-up:
- Close Safari
- Open
~/Library/Safari
and moveHistory.db
somewhere (e.g.~/Downloads
) - Make a back-up of
History.db
(I just compressed it) - Open a terminal window and navigate to the directory where
History.db
is - Run these commands:
> sqlite3 History.db
> sqlite> .database
> seq name file
> --- --------------- ----------------------------------------------------------
> 0 main /Users/marian/Downloads/History.db
> sqlite> VACUUM;
> sqlite> .quit
- Copy
History.db
back to~/Library/Safari
- Open Safari and check if the issues are gone
- If the history is gone or glitchy just close Safari and replace
History.db
with the back-up
notes:
The VACUUM command cleans the main database by copying its contents to a temporary database file and reloading the original database file from the copy. This eliminates free pages, aligns table data to be contiguous, and otherwise cleans up the database file structure.
note this might also do the trick at the expense of clearing cookies: