Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance: Refactors query prefetch mechanism (#4361)
* sketch out improved ParallelPrefetcher; focus is on reducing allocations, but we also can't be substantially slower to start all tasks * little more cleanup to further reduce allocations, and save a tiny amount of CPU * start on testing * some tweaks and testing for buffer management * test exception handling; fix a bug in high concurrency case that would swallow exceptions * test cancellation * more testing, a little bit of cleanup * test the case where the enumerator faults; fixes a couple leaks of Tasks and buffers that could occur in that some places * tiny bit of cleanup * cleanup and expand comments; code is tricky, it needs documentation * address a whole bunch of style nits, just to keep compiler Message counts down * address some feedback on comment clarity * don't rely on finalizers for testing, it's too brittle; hold up was not allocating more in the non-test cases, but found a field to reuse; needs benchmarking * complete ITrace proxy for testing * style nits and a bit more commentary * explicit test for concurrent access to the inner IEnumerator * explicit test that IEnumerator is disposed * explicitly implement all ITrace members * address feedback: internal class members should be public or private * address feedback: break test-only bits of ParallelPrefetch out into a partial * address feedback: move const above type declarations * address feedback: naming nits * address feedback: use the existing NoOpTrace * address feedback: remove pointless using * update baseline trace text for QueryAsync test --------- Co-authored-by: neildsh <35383880+neildsh@users.noreply.github.com>
- Loading branch information