Performance: pipeline-sends.diff
File pipeline-sends.diff, 1.5 KB (added by warner, at 2007-09-09T00:10:23Z) |
---|
-
src/allmydata/encode.py
old new 240 240 241 241 d.addCallback(lambda res: self.finish_hashing()) 242 242 243 d.addCallback(lambda res: 244 self.send_plaintext_hash_tree_to_all_shareholders()) 245 d.addCallback(lambda res: 246 self.send_crypttext_hash_tree_to_all_shareholders()) 247 d.addCallback(lambda res: self.send_all_subshare_hash_trees()) 248 d.addCallback(lambda res: self.send_all_share_hash_trees()) 249 d.addCallback(lambda res: self.send_uri_extension_to_all_shareholders()) 243 d.addCallback(lambda res: self.send_hashes_and_close()) 250 244 251 d.addCallback(lambda res: self.close_all_shareholders())252 245 d.addCallbacks(lambda res: self.done(), self.err) 253 246 return d 254 247 … … 451 444 d.addCallback(_got_hashtree_nodes) 452 445 return d 453 446 447 def send_hashes_and_close(self): 448 dl = [] 449 dl.append(self.send_plaintext_hash_tree_to_all_shareholders()) 450 dl.append(self.send_crypttext_hash_tree_to_all_shareholders()) 451 dl.append(self.send_all_subshare_hash_trees()) 452 dl.append(self.send_all_share_hash_trees()) 453 dl.append(self.send_uri_extension_to_all_shareholders()) 454 dl.append(self.close_all_shareholders()) 455 return self._gather_responses(dl) 456 454 457 def send_plaintext_hash_tree_to_all_shareholders(self): 455 458 log.msg("%s sending plaintext hash tree" % self) 456 459 dl = []