Last Comment Bug 308369 - Stop copying stat cache when cloning nsIFile instances
: Stop copying stat cache when cloning nsIFile instances
Status: RESOLVED FIXED
: fixed1.8
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: All All
: -- major (vote)
: mozilla1.8beta5
Assigned To: Darin Fisher
:
Mentors:
Depends on:
Blocks: 308370
  Show dependency treegraph
 
Reported: 2005-09-13 12:31 PDT by Darin Fisher
Modified: 2005-09-22 12:48 PDT (History)
5 users (show)
mscott: blocking1.8b5+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 patch (3.46 KB, patch)
2005-09-13 13:14 PDT, Darin Fisher
no flags Details | Diff | Splinter Review
v1.1 patch (4.68 KB, patch)
2005-09-13 13:50 PDT, Darin Fisher
jaas: review+
doug.turner: superreview+
asa: approval1.8b5+
Details | Diff | Splinter Review

Description Darin Fisher 2005-09-13 12:31:26 PDT
Stop copying stat cache when cloning nsIFile instances

I now believe that this patch was a mistake.  See discussion in bug 307815 and
bug 307429.  Caching stat buffers is a real big hack that results in a variety
of workaround hacks.  The ability to dump the cache by cloning a nsIFile is
nice.  The alternative is to create a new nsIFile and initialize it via
initWithFile, but that is more work for consumers.  We should make nsIFile.clone
and nsILocalFile.initWithFile work consistently in this regard.
Comment 1 Darin Fisher 2005-09-13 12:31:58 PDT
-> me
Comment 2 Darin Fisher 2005-09-13 13:14:59 PDT
Created attachment 195930 [details] [diff] [review]
v1 patch
Comment 3 Doug Turner (:dougt) 2005-09-13 13:24:59 PDT
Comment on attachment 195930 [details] [diff] [review]
v1 patch

do you really neet to zero the mFileInfo64?  I know it is being done in other
places.
Comment 4 Josh Aas 2005-09-13 13:25:50 PDT
Comment on attachment 195930 [details] [diff] [review]
v1 patch

Why the memset calls? Also, are we just letting the perf win from 122892 go
away?
Comment 5 Josh Aas 2005-09-13 13:34:35 PDT
I think I accidently killed dougt's sr+ since both of us were editing the
attachment at the same time and he hit submit first. I'd add my r+, but I don't
see why we need the memset calls that zero mFileInfo64.
Comment 6 Darin Fisher 2005-09-13 13:41:08 PDT
I added the memset calls for consistency with the default constructors.  If we
want to drop memset from the copy constructors then we should do so for the
default constructors as well.  I suspect that there is no reason for the memset
calls, otherwise.

As for the performance impact of this change, I don't think it's significant
enough to concern us with the impending release.
Comment 7 Darin Fisher 2005-09-13 13:50:41 PDT
Created attachment 195941 [details] [diff] [review]
v1.1 patch

bye bye memset
Comment 8 Darin Fisher 2005-09-13 15:09:20 PDT
fixed-on-trunk
Comment 9 Scott MacGregor 2005-09-14 11:10:09 PDT
Darin, can you elaborate more for the triage team about why we should take this
fix for Firefox 1.5? What's the user impact, it's unclear from the bug? Thanks.
Comment 10 Darin Fisher 2005-09-14 13:51:44 PDT
(In reply to comment #9)
> Darin, can you elaborate more for the triage team about why we should take this
> fix for Firefox 1.5? What's the user impact, it's unclear from the bug? Thanks.

Scott: This patch is needed in order to fix bug 307429 "properly."
Comment 11 Scott MacGregor 2005-09-14 23:19:51 PDT
Thanks Darin. That bug has been marked as a 1.8b5 blocker so this bug must be too.
Comment 12 Darin Fisher 2005-09-22 12:48:54 PDT
fixed1.8

Note You need to log in before you can comment on or make changes to this bug.