In the Messages app, we don't have several times the same image displayed in the same time... yet. But this will eventually come if we display the contact's picture in the thread view. So thanks for this bit of advice !

Le 19/04/2014 03:09, L. David Baron a écrit :
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


_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to