Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Kinda but not really.

I expect a tab to stay in memory, at least in virtual memory, and not need to hit the server if it's in the background for a while and then I click on it again, unlike history or bookmarks.

I expect history to not be loaded in memory, it would be a waste of memory.

I expect bookmarks to show up in search. Searching history is different, history has a ton of useless garbage in it. "Bookmark" means "When I type this, show this one URL before all the other ones that seem relevant".



All browsers use SQLite3 DBs for this stuff. History is not "loaded into memory" -- it's in the SQLite3 DB, which has a page cache, so some of it might be in memory, but the amount of memory dedicated to the page cache is fixed, so you need not worry about it.

> I expect bookmarks to show up in search. Searching history is different, history has a ton of useless garbage in it.

There is truly no difference except that some URIs are bookmarked (and maybe also in recent history) and some are not. Either way searching these is just a SQL query against the SQLite3 DB. You really need not worry about the efficiency of the search -- it's fast enough. The table(s) that store these things have enough metadata to enable the kinds of searches you might want to do. Among such metadata is "this is a bookmark" and "this is not a bookmark".

> "Bookmark" means "When I type this, show this one URL before all the other ones that seem relevant".

That doesn't preclude treating it not that differently from history. You really need not worry about those details.

Also, a "bookmark" is more than that: it also has a name, it may be in a folder, it may be in the bookmark toolbar, it may have tags to help you search for it, etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: