There are two things I'm looking into atm: 1. Ion compilation memory is freed off-thread, with one free task per compilation. We can instead batch those into a single free task for cases where we cancel multiple compilations at once. This both avoids per-task (dispatch) overhead and also helps us avoid freeing memory concurrently (jemalloc lock contention). 2. When we link an Ion compilation, we can link all pending compilations for the current realm. This also lets us take advantage of the concurrent freeing mechanism above. I have some patches implementing this; now I just need to see how it affects performance.
Bug 1853404 Comment 2 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
There are two things I'm looking into atm: 1. Ion compilation memory is freed off-thread, with one free task per compilation. We can instead batch those into a single free task for cases where we cancel multiple compilations at once. This both avoids per-task (dispatch) overhead and also helps us avoid freeing memory concurrently (jemalloc lock contention). 2. When we link an Ion compilation, we can link all pending compilations for the current realm. This also lets us take advantage of the batched freeing mechanism above. I have some patches implementing this; now I just need to see how it affects performance.