Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c15d6de9 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

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
parent b13bf71c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment