agzam / browser-hist.el

Search through browser history, in Emacs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use sensible limits

sarg opened this issue · comments

My browser history is ~400Mb:

sqlite> select count(1) from History;
1041185

It chokes emacs when typing first letter of the query, because the result list is huge. Could be avoided by limiting unconditionally to 100 entries, instead of doing that only for the empy input.

The way to access the history db is to copy it fully and that takes time, if you don't need the latest, recent history all the time, try increasing browser-hist-cache-timeout. It will not copy the file all the time.

And then, if you need to include the latest results, you can call the command with universal argument, that will disregard the cached db file and copy it over again.

The problem is not in copying, but rather with feeding tens of thousands rows to completing-read.

When was the last time you've updated the package? #15 added some improvements.

I use the latest. The fix I've implemented in my checkout is to force LIMIT 100 unconditionally:

-                   rest (and emptyp " LIMIT 100")))) ;No match, just return history
+                   rest " LIMIT 100"))) ;No match, just return history

Otherwise typing e.g. reddit makes emacs freeze for a minute until showing that the result set has 14k elements.