Closed GodTamIt closed 8 months ago
So, the improvement is mainly on batch_get right? Since batch_get usually needs more time. 👍
Right, batch gets can run for an extended amount of time without having to re-acquire the GIL to access Python objects.
Individual get()
s do not because they need the GIL to access the Python object values for the key and value every time. So if you do a get for a bunch of items, you're going to be contending on the lock for each iteration.
For posterity, I'll comment here a few more details:
Before:
After: