mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-05 22:43:46 +00:00
* Make sslibrary init faster by loading bookcases asynchronously in parallel (#74835) On terry this takes 17 to 20 seconds to init (3 seconds on servers local to the db like sybil), during which world.cpu is 4%. This is because it waits for each bookcase to do its random books sql query before initializing the next bookcase. callback_select is a system to invoke a list of callbacks asynchronous but only return once they are all finished running, Easymode pipelining of network requests. There is also the query side query_select that would more directly do what we want, but the query is too detached from the loop to do it that way. There is also the fact that we could make this not do a query per-bookcase, but that just makes the code more abstract for a benefit we can get by just doing some basic pipelining of network requests using a single proc i wrote 6 years ago * Make sslibrary init faster by loading bookcases asynchronously in parallel --------- Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>