Open nicelhc13 opened 2 years ago
Main concern is that I think @sestephens73 had a bunch of reasons for moving resource allocation for mapping. Want to make sure we can resolve those before moving it back.
yes please point me out. regardless of that this pr works, the main bottleneck was that updating resources at mapping is bad.
let me also add @yinengy for the review.
This PR updates two main things: 1) replace lock-based resource tracking with lock-free one by making the scheduler manage. 2) move resource updates from mapping to launching; it blocked task scheduling critically.
With this update, on 2000 independent tasks + with GIL + 76000 microsec for each task + depth 100 (5MB), it took 7 sec for each iteration.
Without this, it took more than 130 sec for each iteration.