Stop doing an exists() call in StartupCache::LoadArchive()

RESOLVED FIXED in Firefox 69

Status

()

defect
RESOLVED FIXED
2 months ago
Last month

People

(Reporter: Gijs, Assigned: mconley)

Tracking

(Blocks 1 bug, {main-thread-io, perf})

67 Branch
mozilla69
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox69 fixed)

Details

(Whiteboard: [fxperf:p2][fxperfsize:XS])

Attachments

(2 attachments)

Reporter

Description

2 months ago

https://searchfox.org/mozilla-central/rev/6dab6dad9cc852011a14275a8b2c2c03ed7600a7/startupcache/StartupCache.cpp#221-228

  bool exists;
  mArchive = nullptr;
  nsresult rv = mFile->Exists(&exists);
  if (NS_FAILED(rv) || !exists) return NS_ERROR_FILE_NOT_FOUND;

  mArchive = new nsZipArchive();
  rv = mArchive->OpenArchive(mFile);

I'd expect nsIZipArchive to complain if it gets passed a non-existent file; we should key off that instead of a separate check.

Reporter

Updated

2 months ago
Component: General → XPCOM
Product: Firefox → Core
Whiteboard: [fxperf] → [fxperf][fxperfsize:XS]
Whiteboard: [fxperf][fxperfsize:XS] → [fxperf:p2][fxperfsize:XS]
Assignee: nobody → mconley

Comment 3

Last month
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c19e86931d1a
Skip exists check when trying to open startupcache zip file archive. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/8242c6c52f6c
Remove startupCache stat entry from main thread IO whitelist. r=florian

Hell, how embarrassing. Sorry for the run-around - new patch coming up.

Comment 6

Last month
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/79a583fd7cd9
Skip exists check when trying to open startupcache zip file archive. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/9ee0f79d80d1
Remove startupCache stat entry from main thread IO whitelist. r=florian
Flags: needinfo?(mconley)

Comment 7

Last month
bugherder
Status: NEW → RESOLVED
Closed: Last month
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.