Make ImageLib share cached imgRequests for the same SVG document even if the URI has a different ref/hash
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
Performance Impact | ? |
People
(Reporter: jwatt, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
(Keywords: testcase-wanted)
Attachments
(1 file, 1 obsolete file)
(deleted),
text/html
|
Details |
Reporter | ||
Comment 1•10 years ago
|
||
Reporter | ||
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Updated•10 years ago
|
Reporter | ||
Comment 4•10 years ago
|
||
Comment 5•10 years ago
|
||
Comment 6•8 years ago
|
||
Comment 7•7 years ago
|
||
Comment hidden (advocacy) |
Comment hidden (advocacy) |
Comment hidden (advocacy) |
Comment 13•5 years ago
|
||
I'm unable to reproduce this problem in neither Firefox for Linux (75) nor Mac (76.0.01)
https://justafish.github.io/sprite-test/
Comment 14•5 years ago
|
||
(In reply to sally from comment #13)
I'm unable to reproduce this problem in neither Firefox for Linux (75) nor Mac (76.0.01)
https://justafish.github.io/sprite-test/
That test cases doesn't use images in the sense of this bug: <img>, svg <image>, background images is what this bug is talking about. That test cases uses <use>.
Comment hidden (advocacy) |
Comment 16•4 years ago
|
||
If you need a work-around until this bug is fixed: I just found out, that Firefox only makes one request, if you use an SVG <use> element instead of an <img> or CSS background-image. That is, replace this HTML:
<img src="sprite.svg#foo">
with this embedded SVG:
<svg><use xlink:href="sprite.svg#foo"/></svg>
(Note the closing “/>” on the <use>!)
Comment hidden (off-topic) |
Comment hidden (obsolete) |
Comment hidden (off-topic) |
Updated•3 years ago
|
Comment 20•3 years ago
|
||
Here's a test case. Firefox requests each image three times, other browsers only once.
Hope this helps to fasten things up.
Comment 21•3 years ago
|
||
(In reply to Manuel Strehl from comment #16)
If you need a work-around until this bug is fixed: I just found out, that Firefox only makes one request, if you use an SVG <use> element instead of an <img> or CSS background-image. That is, replace this HTML:
<img src="sprite.svg#foo">
with this embedded SVG:
<svg><use xlink:href="sprite.svg#foo"/></svg>
(Note the closing “/>” on the <use>!)
Can this be used for cross-origin urls?
Updated•2 years ago
|
Updated•2 years ago
|
Comment hidden (advocacy) |
Updated•1 year ago
|
Comment 24•1 year ago
|
||
For sure, it's a performance problem. A standalone test case is attached to https://bugzilla.mozilla.org/show_bug.cgi?id=1842382.
For this test case:
Firefox: page is opened in 30-40 sec, RAM usage is 6 GB
Chrome: page is opened in 2-3 sec, RAM usage is 0.2 GB
Comment 25•1 year ago
|
||
Hey this is impacting a high-priority webperf issue, https://bugzilla.mozilla.org/show_bug.cgi?id=1842382. Any chance you can comment on status or WIP? thanks.
Description
•