btrask / stronglink

A searchable, syncable, content-addressable notetaking system
Other
1.04k stars 39 forks source link

Slow logging #100

Open btrask opened 8 years ago

btrask commented 8 years ago

Our alogf log function prefixes logged messages with a timestamp, which is very useful. Unfortunately, that requires two printf statements, which we don't want to get split up by concurrent writes. Right now we're using flockfile(3) which makes logging even slower than usual.

Possible approaches:

Not sure what the best (simplest/fastest) solution is.

Performance does in fact matter for traffic logging.

btrask commented 8 years ago

Actually alogf isn't used for traffic logging. However traffic logging could still be made faster by doing all writing on a single thread, which would let us omit extra locking.