This project has moved and is read-only. For the latest updates, please go here.

performance over time

Mar 24, 2011 at 11:39 AM

I'm testing the PersistentDictionary of guid, string which I insert a simple json string of around 1kb, initially it inserts 2000/sec but goes down to ~200/sec after around 120000 inserts ( this is after I removed the cursor.TrySeek in the add method ) which indicates the performance goes down after lots of inserts. The size of the edb file for 152000 items is 200mb.

Mar 24, 2011 at 5:26 PM

Using guids as keys will result in slow insert performance because the inserts will be spread out all over the dictionary. The drop in performance happens because the bottom level of the b-tree is no longer cached in memory so inserts have to do read I/Os to get the pages from disk.

If you try an ascending key value (e.g. long) then you should get much higher sustained performance.

Removing the TrySeek and replacing it with a check for JET_err.KeyDuplicate does look like a good idea for an optimization.

Mar 24, 2011 at 5:37 PM

Ah, I see, thanks.

Unfortunately I need the guids as keys, is there a way to disassociate the key and indexing/ sorting, or defer the indexing to later.