7 ms·
One easy fix for this kind of code is to add an API to fetch multiple instances per call. Fetching 100 handles per call would speed up the processing (assuming
by pierrebai 9y ago
One easy fix for this kind of code is to add an API to fetch multiple instances per call. Fetching 100 handles per call would speed up the processing (assuming the locking/unlocking is the pain point) by a factor of 100.
Adjust the magical 100 for the typical problematic use case scale and be done. (Although dividing something by 100 is usually good enough.)