Async profiler 4.0 added a new feature which improved the efficiency for sampling sleeping threads:
Previously, if a thread was blocked for e.g. a second, the profiler would periodically wake it up and collect the same stacktrace every time. With batching, the profiler got smarter: It still wakes the thread up, but then detects that the CPU-time of the thread hasn't changed, so it can omit fetching the same stacktrace again.
Unfortunately we couldn't make use of this yet and therefore had to disable this improvement for inferred spans in #1872.
Thanks to async-profiler/async-profiler#1277 being now implemented, we could now enable this feature and still correctly infer spans.