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

Commit 610ebf03 authored by LaMont Jones's avatar LaMont Jones
Browse files

Improve memory usage in multiproduct_kati

Start the subtasks at 15 second intervals, rather than all at once.

Bug: b/286423944
Test: manual
Change-Id: I21981460dcdd618f42abefcc221a05ce6aca84c1
parent 8f557323
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -399,6 +399,9 @@ func main() {
	var wg sync.WaitGroup
	var wg sync.WaitGroup
	for i := 0; i < jobs; i++ {
	for i := 0; i < jobs; i++ {
		wg.Add(1)
		wg.Add(1)
		// To smooth out the spikes in memory usage, skew the
		// initial starting time of the jobs by a small amount.
		time.Sleep(15 * time.Second)
		go func() {
		go func() {
			defer wg.Done()
			defer wg.Done()
			for {
			for {