Make BridgeDB's use of Stability.addOrUpdateBridgeHistory() configurable.
I thought I remembered a ticket where sysrqb stated something to the effect of
I profiled the startup of BridgeDB, and 80% of the ~25 minute startup time is spent in the
Stability.addOrUpdateBridgeHistory()
function...
but now I can't find it. Either way, it's true that most of the startup time is spent in this function. During that time, the servers are down, because BridgeDB's database transactions aren't threaded (see legacy/trac#5232 (moved)). That function is called from Main.load()
; it collects all the timestamps for all bridges, does a lot of expensive sort()
ing of them, and then the transactions... and I'm not even certain if Metrics uses this data (or if anything uses this data).
I kind of don't want to touch it until I understand more about why it was put there, but for the staging instance (legacy/trac#10723 (moved)) startup times of ~25 minutes is rather painful. I propose adding a COLLECT_TIMESTAMPS
option in the config file, and if False
then skip that block of code in Main.load()
.