-
Notifications
You must be signed in to change notification settings - Fork 0
Performance notes
Adam Fraser edited this page Feb 17, 2015
·
2 revisions
lag-queue
- change.TimeReceived until added to all channel caches
- TimeReceived set immediately prior to calling processEntry
lag-queue is made up of:
-
processEntry
- get changeCache write lock
- is next sequence
- _addToCache
- _addPendingLogs()
- is pending
- adds to pending
- if past maxPending, does _addPendingLogs()
- was skipped
- _addToCache
-
_addToCache
- for each channel
- gets cache from map (already has write lock from above)
- channel.addToCache
- if late, channel.AddLateSequence
- for each channel
-
channel.addToCache
- gets channel cache write lock
- _appendChange
- if latest, iterate over cache looking for duplicate DocID
- if late, iterate over cache looking for position and duplicate DocID
- _pruneCache
- loop - if cache exceeds max, remove first entry