mirror of
https://github.com/servo/servo
synced 2026-05-13 10:27:03 +02:00
Rework image_cache_task to avoid using `url` as key during the loadin… …g of an image. A `url` can be very large, in particular if it is a data: url, so using it as a key for lookups whenever we load a few bytes is not a very good idea. This patch introduces an intermediate `LoadKey` (internally, an u64) that makes hashmap lookups faster. Somewhere along the way, we also get rid of a few calls to `url.clone()`. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7894) <!-- Reviewable:end -->