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

Skip to content
Commit 7d154917 authored by Kweku Adams's avatar Kweku Adams
Browse files

Optimize pending job queue iteration.

Batch the jobs pulled during iteration so that we pull several of an
app's jobs from the queue sequentially (resulting in some out of order
pulls) instead of pulling purely based on the sort order. Batching it
this way will mean we try to run several jobs of the same app at the
same, resulting in fewer process restarts, and can allow the iteration
runtime to amortize to O(A*J) instead of O(A*J*log(A)) for A <= 33,
where A = # apps and J = average # jobs per app.

Bug: 204924801
Test: atest FrameworksServicesTests:PendingJobQueueTest
Change-Id: I4d3dc17afb4d4ab0fb573d75a319bdb20a68c634
parent b0ea1d0b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment