Changes

Jump to: navigation, search

Browser History

1,737 bytes added, 20:03, 3 October 2005
Database design
Transition type will hopefully contain info about whether the link was clicked, opened in new tab/window, typed, etc.
 
=== Performance ===
 
The sqlite database system does file-level locking to manage access to the database. This means that for every transaction (even read), the database file must be checked for changes to update the cache, and locked. Most systems can do this quickly, although this operation is clearly not good for performance. Some Linux/Unix users may have their home directories and profiles stored on a network-mounted drive. In these cases, individual database accesses can be relatively expensive.
 
Therefore, it is very important that database access be minimized and grouped in transactions. A new query/result format will be used instead of RDF. RDF requires many extra transactions, to retrieve the ID of a URL, then to retrieve the title, then to retrieve the visit date, etc. This makes performance, especially for network users, unacceptably slow.
 
==== Link coloring ====
 
Link coloring is perhaps the most important performance issue, since this directly affects page load time. A naive approach requires querying the database for each link that comes in. Even when the history database is local, asking the OS for a file lock for each link on a page will be very bad for performance.
 
To solve this problem, URLs will be loaded into an in-memory database when the application starts (or, perhaps, the first time they are required). These links can be sorted so they can be accessed very quickly, and rquire no OS calls or file locks. This list will only contain URLs, and none of the extra information such as visit dates, visit counts, and titles.
 
==== Database size ====
 
I just imported my Mork history database file into the equivalent sqlite format. The sqlite file was 10x smaller than the original Mork file.
202
edits

Navigation menu