The Ray autoscaler v2's debug logging, which was proven to dominate a 20,000-task scheduling pass, is now skipped by default unless the debug level is explicitly enabled, cutting that operation's time from ~5.3 seconds to ~0.19 seconds.
Conditionally skips expensive serialization in the autoscaler's debug logging, removing a major performance bottleneck in large task scheduling passes.
Users and operators running large-scale Ray workloads with 20,000 or more tasks will see their autoscaler respond dramatically faster, reducing scheduling latency by over 27 times and allowing compute resources to be utilized more efficiently. The change achieves this by eliminating the costly serialization process (to_dict_list) for debug logs unless debugging is explicitly turned on. The main thing to watch is whether the default-off behavior for debug logging causes any unexpected issues when operators need to debug the autoscaler's scheduling decisions.