(In reply to Daniel Holbert [:dholbert] from comment #1) > Maybe each removal is triggering a notification to be sent to all remaining instances of the image, or something like that? Hmm, the documentation for `Discard` does suggest that all calls after the first are **supposedly** no-ops in this case: https://searchfox.org/mozilla-central/rev/a965e3c683ecc035dee1de72bd33a8d91b1203ed/image/imgIContainer.idl#571-575 ``` /** * If this image is unlocked, discard its decoded data. If the image is * locked or has already been discarded, do nothing. */ void requestDiscard(); ``` So: given how much time the profile is spending in `Discard`: either we're failing to make those subsequent calls be actually no-ops, or we're doing that part properly and it's just that the one substantial call that we do get takes forever for some reason.
Bug 1943857 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.
(In reply to Daniel Holbert [:dholbert] from comment #1) > Maybe each removal is triggering a notification to be sent to all remaining instances of the image, or something like that? Hmm, the documentation for `Discard` does suggest that all calls after the first are **supposedly** no-ops in this case: https://searchfox.org/mozilla-central/rev/a965e3c683ecc035dee1de72bd33a8d91b1203ed/image/imgIContainer.idl#571-575 ``` /** * If this image is unlocked, discard its decoded data. If the image is * locked or has already been discarded, do nothing. */ void requestDiscard(); ``` So: given how much time the profile is spending in `Discard`: either we're failing to make those subsequent calls be actually no-ops, or we're doing that part properly and it's just that the one substantial call that we do honor (the first Discard call) takes forever for some reason.