Closed
Bug 920630
Opened 11 years ago
Closed 7 years ago
Improve memory usage of mozilla::image::ImageURL
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: sworkman, Assigned: aosmond)
References
(Blocks 1 open bug)
Details
Attachments
(5 files, 2 obsolete files)
4.84 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
26.51 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
4.61 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
18.31 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
8.03 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
ImageURL (added in Bug 867755) has some redundancy in it's memory usage. This should be improved.
Assignee | ||
Comment 1•7 years ago
|
||
We can eliminate ImageURL entirely now that nsIURI implementations are immutable and threadsafe.
Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 3•7 years ago
|
||
Assignee | ||
Comment 4•7 years ago
|
||
Assignee | ||
Comment 5•7 years ago
|
||
Assignee | ||
Comment 6•7 years ago
|
||
Assignee | ||
Comment 7•7 years ago
|
||
Fix how I used RefPtr<nsIURI> instead of nsCOMPtr<nsIURI>.
Attachment #8962817 -
Attachment is obsolete: true
Assignee | ||
Comment 8•7 years ago
|
||
Avoid copying the scheme onto stack in ImageCacheKey constructor. It would be nice if we could also avoid copying the spec for the non-blob URI case. It can get quite large. Adding an nsIURI::GetSpecHash method is probably out of scope for this bug though ;).
Attachment #8962816 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8962815 -
Flags: review?(tnikkel)
Assignee | ||
Updated•7 years ago
|
Attachment #8962818 -
Flags: review?(tnikkel)
Assignee | ||
Updated•7 years ago
|
Attachment #8962819 -
Flags: review?(tnikkel)
Assignee | ||
Updated•7 years ago
|
Attachment #8962822 -
Flags: review?(tnikkel)
Assignee | ||
Updated•7 years ago
|
Attachment #8962832 -
Flags: review?(tnikkel)
Updated•7 years ago
|
Attachment #8962815 -
Flags: review?(tnikkel) → review+
Comment 9•7 years ago
|
||
Comment on attachment 8962832 [details] [diff] [review]
0002-Bug-920630-Part-2.-Change-ImageCacheKey-to-use-nsIUR.patch, v2
Review of attachment 8962832 [details] [diff] [review]:
-----------------------------------------------------------------
::: image/ImageCacheKey.cpp
@@ +112,5 @@
> }
>
> // For non-blob URIs, compare the URIs.
> + bool equals = false;
> + mURI->Equals(aOther.mURI, &equals);
Do we need to check the return value of Equals for error?
::: image/ImageCacheKey.h
@@ +59,2 @@
> Maybe<uint64_t> mBlobSerial;
> + nsCString mRef;
Can we call this mBlobRef or something so it's obvious this is only used for blobs?
Attachment #8962832 -
Flags: review?(tnikkel) → review+
Updated•7 years ago
|
Attachment #8962819 -
Flags: review?(tnikkel) → review+
Updated•7 years ago
|
Attachment #8962822 -
Flags: review?(tnikkel) → review+
Updated•7 years ago
|
Attachment #8962818 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 10•7 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #9)
> Comment on attachment 8962832 [details] [diff] [review]
> 0002-Bug-920630-Part-2.-Change-ImageCacheKey-to-use-nsIUR.patch, v2
>
> Review of attachment 8962832 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: image/ImageCacheKey.cpp
> @@ +112,5 @@
> > }
> >
> > // For non-blob URIs, compare the URIs.
> > + bool equals = false;
> > + mURI->Equals(aOther.mURI, &equals);
>
> Do we need to check the return value of Equals for error?
>
It is probably fine, but I'll add the check in for safety's/consistency's sake.
> ::: image/ImageCacheKey.h
> @@ +59,2 @@
> > Maybe<uint64_t> mBlobSerial;
> > + nsCString mRef;
>
> Can we call this mBlobRef or something so it's obvious this is only used for
> blobs?
Will do.
Assignee | ||
Comment 11•7 years ago
|
||
Comment 12•7 years ago
|
||
Pushed by aosmond@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ff2162607d61
Part 1. Improve image logging to support direct logging of URIs and images objects. r=tnikkel
https://hg.mozilla.org/integration/mozilla-inbound/rev/9f7a040f06f9
Part 2. Change ImageCacheKey to use nsIURI directly instead of ImageURL. r=tnikkel
https://hg.mozilla.org/integration/mozilla-inbound/rev/7597bbcc9d66
Part 3. Change Image/ImageResource and derived classes to use nsIURI directly instead of ImageURL. r=tnikkel
https://hg.mozilla.org/integration/mozilla-inbound/rev/dcf212d04876
Part 4. Change rest of imagelib to use nsIURI directly instead of ImageURL. r=tnikkel
https://hg.mozilla.org/integration/mozilla-inbound/rev/e2002e5279d1
Part 5. Remove image/ImageURL.h as unused. r=tnikkel
Comment 13•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ff2162607d61
https://hg.mozilla.org/mozilla-central/rev/9f7a040f06f9
https://hg.mozilla.org/mozilla-central/rev/7597bbcc9d66
https://hg.mozilla.org/mozilla-central/rev/dcf212d04876
https://hg.mozilla.org/mozilla-central/rev/e2002e5279d1
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•