Closed
Bug 320328
Opened 19 years ago
Closed 19 years ago
Ts regression from bug 316416 (nsIModuleLoader)
Categories
(Core :: XPCOM, defect, P2)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
People
(Reporter: benjamin, Assigned: benjamin)
References
Details
Attachments
(3 files, 2 obsolete files)
4.13 KB,
patch
|
sfraser_bugs
:
review+
jaas
:
review+
|
Details | Diff | Splinter Review |
9.74 KB,
patch
|
Details | Diff | Splinter Review | |
10.08 KB,
patch
|
darin.moz
:
review+
|
Details | Diff | Splinter Review |
There was a Ts regression on some machines from bug 316416, although the Ts numbers are wonky enough that I'm not sure I can trust them. The two tboxen that showed a definite reaction were seamonkey monkey and creature: the camino tbox wanders around aimlessly and all the others show a flat line or even improvement. Right now I'm suspecting calls to nsLocalFile::Equals on both mac and windows: they both hit the filesystem for both localfiles being compared and don't cache the result. On windows my attempted solution is going to be to cache the shortpath instead of the hash. On mac my attempted solution is to use GetFSRefInternal with bForceUpdateCache = PR_FALSE so that we use the cached FSRef when available.
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #205967 -
Flags: review?(darin)
Assignee | ||
Updated•19 years ago
|
Priority: -- → P2
Assignee | ||
Comment 2•19 years ago
|
||
Attachment #206012 -
Flags: review?(sfraser_bugs)
Comment 3•19 years ago
|
||
nsLocalFileWin::Equals + nsCOMPtr<nsILocalFileWin> lf(do_QueryInterface(inFile)); + if (!lf) + return NS_NOINTERFACE; shouldn't that just set *_retval to false and return success?
Comment 4•19 years ago
|
||
+nsLocalFile::EnsureShortPath() +{ + if (mShortWorkingPath.Length()) if (!mShortWorkingPath.IsEmpty())
Comment 5•19 years ago
|
||
Comment on attachment 206012 [details] [diff] [review] Use the cached FSRef Josh, since you were worried about nsLocalFile caching, can you look at this? Also, do we have any startup numbers with this patch?
Attachment #206012 -
Flags: review?(joshmoz)
Assignee | ||
Comment 6•19 years ago
|
||
No, my only mac is a laptop which is not stable enough to produce useful Ts numbers.
Comment on attachment 206012 [details] [diff] [review] Use the cached FSRef smfr: I was worried about the fact that Windows and Linux cache file sizes and don't update the cache when a file is written to. Apparently we're going to live with that bug (*smacks forehead*). This doesn't seem to have anything to do with that. This looks fine to me. If Ts doesn't improve though, I suggest just backing it out since it is an unnecessary risk.
Attachment #206012 -
Flags: review?(joshmoz) → review+
Updated•19 years ago
|
Attachment #206012 -
Flags: review?(sfraser_bugs) → review+
Comment 8•19 years ago
|
||
Comment on attachment 205967 [details] [diff] [review] Cache the shortname, rev. 1 >Index: xpcom/io/nsILocalFileWin.idl >+ /** >+ * The native short pathname (8.3) for this file. If there is no >+ * short path, the long path will be returned. >+ */ >+ readonly attribute AString shortPath; >+ [noscript] readonly attribute ACString nativeShortPath; It seems to me that exposing the short path is just not that ideal b/c of the fact that there simply may be no short path on some filesystems. This patch only needs a canonical path that can be hashed and compared for equality. So, it would seem that exposing a "canonicalPath" attribute might be best. Also, why aren't you just using the persistent descriptor attribute for this purpose?
Assignee | ||
Comment 9•19 years ago
|
||
We (Silver) already vetoed using the persistent descriptor because it currently is displayed in the Firefox pref UI and is typically the long name. How is your "canonicalPath" attribute different than the "shortPath" I created?
Comment 10•19 years ago
|
||
> We (Silver) already vetoed using the persistent descriptor because it > currently is displayed in the Firefox pref UI and is typically the long name. So, why not use the long name as the canonical name? You can call GetLongPathName on Win98 and above. On Win95, you'd have to call FindFirstFile on each path segment to normalize to the long path, but we weren't planning on supporting Win95 for FF 3, right? > How is your "canonicalPath" attribute different than the "shortPath" I created? I think my point was that you just need some canonical path to hash and compare, you don't need it to be the short version of the path, which may not exist on some systems, so why call it the short path? I'm arguing for renaming the attribute at least.
Assignee | ||
Comment 11•19 years ago
|
||
I'll cave.
Attachment #205967 -
Attachment is obsolete: true
Attachment #208103 -
Flags: review?(darin)
Attachment #205967 -
Flags: review?(darin)
Assignee | ||
Comment 12•19 years ago
|
||
Comment on attachment 208103 [details] [diff] [review] Cache the shortname, rev. 1.1 Actually, let me fix biesi's nits.
Attachment #208103 -
Flags: review?(darin)
Assignee | ||
Comment 13•19 years ago
|
||
Attachment #208103 -
Attachment is obsolete: true
Attachment #208104 -
Flags: review?(darin)
Comment 14•19 years ago
|
||
Comment on attachment 208103 [details] [diff] [review] Cache the shortname, rev. 1.1 >Index: xpcom/io/nsILocalFileWin.idl >+ /** >+ * The canonical path of the file, which avoids short/long pathname >+ * inconsistencies. >+ */ >+ readonly attribute AString canonicalPath; >+ [noscript] readonly attribute ACString nativeCanonicalPath; I think it'd be good to add some comment to explain why this is not the same as nsILocalFile::persistentDescriptor. To the casual observer, a persistent descriptor would seem to be something that uniquely identifies the file path, but the thing that may not be obvious is that the persistent descriptor need not be canonicalized. You should probably explain that the format of the canonical path may vary from (file)system to (file)system. For example, on some (file)systems, the value is the short path name, and on others it is the long path name.
Comment 16•19 years ago
|
||
Comment on attachment 208106 [details] [diff] [review] Cache the shortname, rev. 1.3 r=darin
Attachment #208106 -
Flags: review?(darin) → review+
Updated•19 years ago
|
Attachment #208104 -
Flags: review?(darin)
Assignee | ||
Comment 17•19 years ago
|
||
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•