Closed Bug 1544037 Opened 6 years ago Closed 5 years ago

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

Categories

(Core :: XPCOM, defect)

67 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: Gijs, Assigned: mconley)

References

(Blocks 1 open bug)

Details

(Keywords: main-thread-io, perf, Whiteboard: [fxperf:p2][fxperfsize:XS])

Attachments

(2 files)

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.

Component: General → XPCOM
Product: Firefox → Core
Whiteboard: [fxperf] → [fxperf][fxperfsize:XS]
Whiteboard: [fxperf][fxperfsize:XS] → [fxperf:p2][fxperfsize:XS]
Assignee: nobody → mconley
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.

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)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Blocks: 1543096
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: