diff options
| author | 2024-10-09 17:20:51 -0700 | |
|---|---|---|
| committer | 2024-10-14 18:40:19 +0000 | |
| commit | c15d6de9b0fad72961fc7f075b75514b6728fe2b (patch) | |
| tree | e3060c68d24ba7080a4d402c994c600b9acbdcef /api/api_test.go | |
| parent | b13bf71c73c1513efa946350b4bef95efb4c23c6 (diff) | |
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
Diffstat (limited to 'api/api_test.go')
0 files changed, 0 insertions, 0 deletions