Open Bug 2002596 Opened 7 months ago Updated 6 months ago

Improve performance manifestparser.filters.chunk_by_runtime

Categories

(Testing :: General, task)

task

Tracking

(Not tracked)

People

(Reporter: sergesanspaille, Assigned: sergesanspaille)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Current implementation spends some time handling the case where key are missing. It turns out this case does not currently happen, so it should be guarded.

The algorithm to balance the load is in O(|runtimes| x |chunks| x log |chunks|) because of repetitive use of sort. We can leverage the fact that the list of chunks is always sorted to do a bisect + insertion, which gives a O(|runtimes| x |chunks|) complexity in worst case, and often O(|runtimes| x log |chunks|)

Blocks: 2002796
No longer blocks: 2002796
Blocks: 1840828
Attachment #9529324 - Attachment description: Bug 2002596 - Improve algorithmic complexity of manifestparser.filters.chunk_by_runtime r=jmaher → Bug 2002596 - Improve algorithmic complexity of manifestparser.filters.chunk_by_runtime r=jmaher!
Pushed by sguelton@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c2284ad36bf5 https://hg.mozilla.org/integration/autoland/rev/849840e08761 Improve algorithmic complexity of manifestparser.filters.chunk_by_runtime r=jcristau
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b281825aa31a https://hg.mozilla.org/integration/autoland/rev/d261486fdca9 Revert "Bug 2002596 - Improve algorithmic complexity of manifestparser.filters.chunk_by_runtime r=jcristau" for causing failures at ChunkByRuntime.

The patch was relying on python 3.10 for the key argument of bisect. Postponing the patch.

Flags: needinfo?(sguelton)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: