servo icon indicating copy to clipboard operation
servo copied to clipboard

net: Use callbacks instead of IPC channels in the `ImageCache` API

Open mrobinson opened this issue 1 month ago • 1 comments

Previously, the ImageCache would inform consumers of changes to image availability by messaging an IPC channel. This isn't great, because it requires serialization and deserialization. Nowadays, ImageCaches are always owned by the same Global that uses them. This change replaces the IPC channel with callback that implements Send.

For the case of normal HTML document images, the results are still sent over the pre-existing Crossbeam channel that was connected via an IPC route. A followup change might eliminate that channel entirely.

Testing: This should not change observable behavior so is covered by existing tests. Fixes: #24338.

mrobinson avatar Nov 06 '25 10:11 mrobinson

Nice improvement!

jdm avatar Nov 06 '25 12:11 jdm