Remove Recursion in Session Management/Traversal
In some cases when Telecom is generating many sessions, deeply nested sessions have a risk of creating a stack overflow when trying to end a session and clean up intermediate nodes. Instead of using recursion, this change moves all traversal to iterative while loops, which do not require the creation of a new stack frame for each node. - Iteration is also faster, for 5 incoming calls before and after the change, I was seeing anywhere from 2%-20% speedups during incoming call setup and disconnect phases. Bug: 370349160 Flag: com.android.server.telecom.flags.end_session_improvements Test: atest TelecomUnitTests; manual testing Change-Id: Ib21af6c1dc303ea0c50544bb09423df72ac52a41
Loading
Please register or sign in to comment