(Hidden by Administrator)
Bug 1527712 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Near the end of startup (I think when loading activity stream), there are 21 stat calls for png files in the thumbnails folder of the profile. Apparently we do 3 stat calls per local file we are fetching. ``` static bool SandboxFetchPromise(struct JSContext *, unsigned int, union JS::Value *) [xul.dll] mozilla::dom::FetchRequest(nsIGlobalObject *,mozilla::dom::RequestOrUSVString const &,mozilla::dom::RequestInit const &,mozilla::dom::CallerType,mozilla::ErrorResult &) [xul.dll] nsresult mozilla::dom::FetchDriver::Fetch(class mozilla::dom::AbortSignalImpl *, class mozilla::dom::FetchDriverObserver *) [xul.dll] nsresult mozilla::dom::FetchDriver::HttpFetch(const class nsTSubstring<char> & const) [xul.dll] nsBaseChannel::AsyncOpen(nsIStreamListener *) [xul.dll] nsresult nsFileChannel::OpenContentStream(bool, class nsIInputStream * *, class nsIChannel * *) [xul.dll] nsresult nsLocalFile::GetFileSize(__int64 *) [xul.dll] nsLocalFile::ResolveAndStat [] nsresult nsLocalFile::ResolveAndStat() [xul.dll] static nsresult GetFileInfo(const class nsTString<char16_t> & const, struct PRFileInfo64 *) [xul.dll] GetFileAttributesExW [KERNELBASE.dll] ``` ``` nsThread::ProcessNextEvent(bool,bool *) [xul.dll] nsresult mozilla::dom::`anonymous namespace'::BeginConsumeBodyRunnable<mozilla::dom::Response>::Run() [xul.dll] nsresult mozilla::dom::FetchBodyConsumer<mozilla::dom::EmptyBody>::GetBodyLocalFile(class nsIFile * *) [xul.dll] nsLocalFile::Exists(bool *) [xul.dll] nsLocalFile::ResolveAndStat [] nsresult nsLocalFile::ResolveAndStat() [xul.dll] static nsresult GetFileInfo(const class nsTString<char16_t> & const, struct PRFileInfo64 *) [xul.dll] GetFileAttributesExW [KERNELBASE.dll] ``` This is at https://searchfox.org/mozilla-central/rev/01b4b3830ea3cae2e9e431019afa6391b471c6da/dom/fetch/FetchConsumer.cpp#505 and looks like a regression from bug 1482752. ``` nsThread::ProcessNextEvent(bool,bool *) [xul.dll] nsresult mozilla::dom::`anonymous namespace'::BeginConsumeBodyRunnable<mozilla::dom::Response>::Run() [xul.dll] mozilla::dom::FileCreatorHelper::CreateFile(nsIGlobalObject *,nsIFile *,mozilla::dom::ChromeFilePropertyBag const &,bool,mozilla::ErrorResult &) [xul.dll] static struct already_AddRefed<mozilla::dom::File> mozilla::dom::FileCreatorHelper::CreateFileInternal(class nsPIDOMWindowInner *, class nsIFile *, const struct mozilla::dom::ChromeFilePropertyBag & const, bool, class mozilla::ErrorResult & const) [xul.dll] static nsresult mozilla::dom::FileCreatorHelper::CreateBlobImpl(class nsIFile *, const class nsTSubstring<char16_t> & const, const class nsTSubstring<char16_t> & const, bool, __int64, bool, bool, class mozilla::dom::BlobImpl * *) [xul.dll] nsresult mozilla::dom::MultipartBlobImpl::InitializeChromeFile(class nsIFile *, const class nsTSubstring<char16_t> & const, const class nsTSubstring<char16_t> & const, bool, __int64, bool) [xul.dll] nsLocalFile::Exists(bool *) [xul.dll] nsLocalFile::ResolveAndStat [] nsresult nsLocalFile::ResolveAndStat() [xul.dll] static nsresult GetFileInfo(const class nsTString<char16_t> & const, struct PRFileInfo64 *) [xul.dll] GetFileAttributesExW [KERNELBASE.dll] ``` This is at https://searchfox.org/mozilla-central/rev/01b4b3830ea3cae2e9e431019afa6391b471c6da/dom/file/MultipartBlobImpl.cpp#331 All this information is from this profile: https://deploy-preview-1687--perf-html.netlify.com/public/292795b9db6b53f5e7f6e2c22256bb54d851f2a7/marker-table/?globalTrackOrder=0&hiddenLocalTracksByPid=10440-1-2-3&markerSearch=DiskIO&range=26.4565_28.3296~26.9908_27.5149&thread=0&timelineType=stack&v=3
Near the end of startup (I think when loading activity stream), there are 21 stat calls for png files in the thumbnails folder of the profile. Apparently we do 3 stat calls per local file we are fetching. ``` static bool SandboxFetchPromise(struct JSContext *, unsigned int, union JS::Value *) [xul.dll] mozilla::dom::FetchRequest(nsIGlobalObject *,mozilla::dom::RequestOrUSVString const &,mozilla::dom::RequestInit const &,mozilla::dom::CallerType,mozilla::ErrorResult &) [xul.dll] nsresult mozilla::dom::FetchDriver::Fetch(class mozilla::dom::AbortSignalImpl *, class mozilla::dom::FetchDriverObserver *) [xul.dll] nsresult mozilla::dom::FetchDriver::HttpFetch(const class nsTSubstring<char> & const) [xul.dll] nsBaseChannel::AsyncOpen(nsIStreamListener *) [xul.dll] nsresult nsFileChannel::OpenContentStream(bool, class nsIInputStream * *, class nsIChannel * *) [xul.dll] nsresult nsLocalFile::GetFileSize(__int64 *) [xul.dll] nsLocalFile::ResolveAndStat [] nsresult nsLocalFile::ResolveAndStat() [xul.dll] static nsresult GetFileInfo(const class nsTString<char16_t> & const, struct PRFileInfo64 *) [xul.dll] GetFileAttributesExW [KERNELBASE.dll] ``` ``` nsThread::ProcessNextEvent(bool,bool *) [xul.dll] nsresult mozilla::dom::`anonymous namespace'::BeginConsumeBodyRunnable<mozilla::dom::Response>::Run() [xul.dll] nsresult mozilla::dom::FetchBodyConsumer<mozilla::dom::EmptyBody>::GetBodyLocalFile(class nsIFile * *) [xul.dll] nsLocalFile::Exists(bool *) [xul.dll] nsLocalFile::ResolveAndStat [] nsresult nsLocalFile::ResolveAndStat() [xul.dll] static nsresult GetFileInfo(const class nsTString<char16_t> & const, struct PRFileInfo64 *) [xul.dll] GetFileAttributesExW [KERNELBASE.dll] ``` This is at https://searchfox.org/mozilla-central/rev/01b4b3830ea3cae2e9e431019afa6391b471c6da/dom/fetch/FetchConsumer.cpp#505 and looks like a regression from bug 1482752. ``` nsThread::ProcessNextEvent(bool,bool *) [xul.dll] nsresult mozilla::dom::`anonymous namespace'::BeginConsumeBodyRunnable<mozilla::dom::Response>::Run() [xul.dll] mozilla::dom::FileCreatorHelper::CreateFile(nsIGlobalObject *,nsIFile *,mozilla::dom::ChromeFilePropertyBag const &,bool,mozilla::ErrorResult &) [xul.dll] static struct already_AddRefed<mozilla::dom::File> mozilla::dom::FileCreatorHelper::CreateFileInternal(class nsPIDOMWindowInner *, class nsIFile *, const struct mozilla::dom::ChromeFilePropertyBag & const, bool, class mozilla::ErrorResult & const) [xul.dll] static nsresult mozilla::dom::FileCreatorHelper::CreateBlobImpl(class nsIFile *, const class nsTSubstring<char16_t> & const, const class nsTSubstring<char16_t> & const, bool, __int64, bool, bool, class mozilla::dom::BlobImpl * *) [xul.dll] nsresult mozilla::dom::MultipartBlobImpl::InitializeChromeFile(class nsIFile *, const class nsTSubstring<char16_t> & const, const class nsTSubstring<char16_t> & const, bool, __int64, bool) [xul.dll] nsLocalFile::Exists(bool *) [xul.dll] nsLocalFile::ResolveAndStat [] nsresult nsLocalFile::ResolveAndStat() [xul.dll] static nsresult GetFileInfo(const class nsTString<char16_t> & const, struct PRFileInfo64 *) [xul.dll] GetFileAttributesExW [KERNELBASE.dll] ``` This is at https://searchfox.org/mozilla-central/rev/01b4b3830ea3cae2e9e431019afa6391b471c6da/dom/file/MultipartBlobImpl.cpp#331 All this information is from this profile: https://perfht.ml/2DQYNoG