Closed takluyver closed 6 years ago
With the changes in #44, it can now send empty data for the full AGIPD detector (16 modules) in about 150ms, so 4x quicker than before. In this case, the server still spends >99% of its time waiting for the client to receive and deserialize data, so there's not much point speeding up the sending code further without speeding up the client.
With other options:
--detector AGIPDModule
to simulate just one AGIPD module can run significantly quicker as it has much less data to send (~20 ms per train).I think this is enough to close this.
I just had a chat with someone (whose name I forgot to ask) who was using the Karabo bridge simulator to develop some code, and wanted it to go faster.
On my computer, with the
--gen zeros
option and a Pythonfor
loop callingclient.next()
to pull messages as quickly as possible, I'm getting about 600ms per message - i.e. about 1.7 Hz.Profiling with
line_profiler
indicates that 69% of the time is spent insocket.recv()
, and 31% insocket.send_multipart()
. The rest of the lines instart_gen
are negligible in comparison. So the server is spending a lot of time waiting for the client to receive the message, deserialise it, and ask for the next one.A few things I can see that we might try: