Skip to content

Make logging handler non-blocking

Leo P. Singer requested to merge leo-singer/gracedb-client:log-threaded into master

It takes a second or more to post a GraceDB log message. For logging purposes, this can be a significant contribution (e.g., in the case of BAYESTAR). This patch modifies the logging handler (ligo.gracedb.logging.GraceDbLogHandler) to write the log messages on a background thread, freeing up the main thread for more computations.

To the best of my knowledge, BAYESTAR is the only client of this module. This patch speeds up BAYESTAR for a particular sample event by about six seconds (from 42.9 down to 37.0 s) on ldas-pcdev2.ligo.caltech.edu.

Merge request reports