Closed
Bug 120299
Opened 23 years ago
Closed 23 years ago
Drop feedback is narrow first time
Categories
(Core :: XUL, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla0.9.9
People
(Reporter: janv, Assigned: janv)
Details
Attachments
(1 file, 3 obsolete files)
2.36 KB,
patch
|
Details | Diff | Splinter Review |
Assignee | ||
Comment 1•23 years ago
|
||
Assignee | ||
Comment 2•23 years ago
|
||
Outliner's image cache uses as key style contexts. It depends on prefilled array
of properties. So it's possible to have different entries in cache for same
image requests. I measured it, folder pane has about 50 entries in the cache.
Default/initial cache size is 64 entries.
I know image lib has own cache, but I think we shouldn't keep redundant image
requests in outliner's cache.
In that patch I chanched it to use image URL (string key) and initial size to 16
entries. It reduced number of entries to about 13 for folder pane.
Drop feedback is narrow first time, because scratch array contains new property
(drop/dropBefore/dropAfter) and thus it doesn't find image request in its cache.
Sounds reasonable ?
Status: NEW → ASSIGNED
Priority: -- → P3
Summary: Drop feedback is stretched first time. → Drop feedback is narrow first time
Target Milestone: --- → mozilla0.9.9
Comment 3•23 years ago
|
||
I suggested doing this a while ago, and hyatt said "I'm fairly convinced that
using URIs as keys would be slower than the way it works now"
Assignee | ||
Comment 4•23 years ago
|
||
Yeah, it would be slightly slower and more malloc happy.
Ccing brendan for possible hashing tips.
Comment 5•23 years ago
|
||
Measure first and see if the difference isn't in the noise -- yeah, nsStringKey
is malloc-happy, but I wonder with the low call counts why this'll hurt.
If there's no opaque, unique-per-image pointer to use, it seems to me the URI
must be the key.
/be
Assignee | ||
Comment 6•23 years ago
|
||
sigh, hand-modified patches
Attachment #65977 -
Attachment is obsolete: true
Comment 7•23 years ago
|
||
Comment on attachment 67502 [details] [diff] [review]
working patch
r=sfraser
This patch fixes the Mac drawing issues.
Attachment #67502 -
Flags: review+
Comment 8•23 years ago
|
||
I'm uncomfortable with this patch, since the current cache prevents
mallocs of URIs in the common cases (straight display and scrolling).
Also, imglib is *already* hashing in a second tier cache by URI.
I think the real problem here is just that there's an invalidate happening
during cell painting when an image is already available in the cache. In
this case, no extra invalidate needs to occur.
I would suggest adding a guard against invalidation in the code that gets
the image. Set a stack-based variable to true right before the call to il->
LoadImage, and then don't let the invalidate happen in the case where
imglib responds synchronously.
e.g.,
mImageGuard = PR_TRUE;
il->LoadImage();
mImageGuard = PR_FALSE;
and in the listener...
if (!mImageGuard)
Invalidate();
But hashing on the URI is redundant and malloc-happy (and you'll
repeatedly re-malloc and build the same URI over and over again).
Updated•23 years ago
|
Attachment #67502 -
Flags: needs-work+
Assignee | ||
Comment 9•23 years ago
|
||
Attachment #67502 -
Attachment is obsolete: true
Comment 10•23 years ago
|
||
Yeah, looks good. Assuming it fixes the bug, sr=hyatt.
Comment 11•23 years ago
|
||
Comment on attachment 67514 [details] [diff] [review]
new patch
r=sfraser, this fixes the bug (so adding hyatt's sr)
Attachment #67514 -
Flags: superreview+
Attachment #67514 -
Flags: review+
Assignee | ||
Comment 12•23 years ago
|
||
Try to get an image after load (in a case it was already cached).
Added comments.
Attachment #67514 -
Attachment is obsolete: true
Comment 13•23 years ago
|
||
a=asa (on behalf of drivers) for checkin to 0.9.8
Assignee | ||
Comment 14•23 years ago
|
||
landed on the trunk and branch
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 15•23 years ago
|
||
this is probably covering or the same as bug 121187
Assignee | ||
Comment 16•23 years ago
|
||
no, it is not the same
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•