Right now every time updateBlocks is called, it makes a call to insert a large number of TwitterUsers by uid so additional data can be picked up by updateUsers. This is an INSERT IGNORE call so it won't overwrite, but it's presumably somewhat expensive to build the call and send it to MySQL. Alternatives:
Keep an in-memory cache in update-blocks.js of recently-seen uids.
Trigger the TwitterUsers insert only on first time calling updateBlocks for a new user AND when diff between blockBatches shows a new external block action, i.e. the only times when new uids show up in the system.
Right now every time updateBlocks is called, it makes a call to insert a large number of TwitterUsers by uid so additional data can be picked up by updateUsers. This is an INSERT IGNORE call so it won't overwrite, but it's presumably somewhat expensive to build the call and send it to MySQL. Alternatives: