Another thing that's a bit dangerous about blobs that sicking and khuey and I were discussing in person that I think is worth bringing up:
If you create two blob URLs for the same Blob (or, for that matter, for different Blob objects that represent the same data), the rest of the system doesn't know that these are the same. So, for example, if they're images, you'll end up with two (identical) decoded images in the image cache, which uses more memory, since imagelib has no idea that these two blob URLs lead to the same resource. So if you're going want to use the same blob as a URL in multiple places, it's best to use the same URL. If they're stylesheets (though I admit that sounds odd), you'd end up defeating a different pile of sharing optimizations (that propagate from failing to share the sheet structures through, as a result, failing to share computed style data). And probably similar things for other types of resources. (Yes, this API seems less than ideal.) -David -- π L. David Baron http://dbaron.org/ π π’ Mozilla https://www.mozilla.org/ π Before I built a wall I'd ask to know What I was walling in or walling out, And to whom I was like to give offense. - Robert Frost, Mending Wall (1914)
signature.asc
Description: Digital signature
_______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
