You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That doesn't sound terrible at first, but given that we also run on low-power platforms such as Android and !RaspberryPi, the picture changes. Under load, we see runtimes 10 to 200 times as high (for both Repy and Python on a !RasPi). As a consequence, places that use the random.repy functions become prone to timing out. This includes the node manager and Affixes trying to advertise (see r7148, and know that in unrestricted mode, the list of connports has 5000 elements).
We should (1) replace our implementation of random_sample with a port of Python's random.sample, and (2) also port Python's random.shuffle which is quite a bit faster than randomly sampling all of the elements of a list.
The text was updated successfully, but these errors were encountered:
Our functions in random.repy are slow. On my moderately modern !MacBook Pro 8,2:
That doesn't sound terrible at first, but given that we also run on low-power platforms such as Android and !RaspberryPi, the picture changes. Under load, we see runtimes 10 to 200 times as high (for both Repy and Python on a !RasPi). As a consequence, places that use the
random.repy
functions become prone to timing out. This includes the node manager and Affixes trying to advertise (see r7148, and know that in unrestricted mode, the list of connports has 5000 elements).We should (1) replace our implementation of
random_sample
with a port of Python'srandom.sample
, and (2) also port Python'srandom.shuffle
which is quite a bit faster than randomly sampling all of the elements of a list.The text was updated successfully, but these errors were encountered: