RESOLVED FIXED 185882
[POSIX] Use access() instead of stat() in FileSystem::fileExists()
https://bugs.webkit.org/show_bug.cgi?id=185882
Summary [POSIX] Use access() instead of stat() in FileSystem::fileExists()
Chris Dumez
Reported 2018-05-22 13:52:09 PDT
Created attachment 341015 [details] Benchmark Use access() instead of stat() in FileSystem::fileExists(). stat() returns a lot of information we do not leverage. Local benchmarking on macOS shows access() being > 80% faster than stat(). Benchmark results: stat: 0.31567 (lower is better) access: 0.16074 (lower is better) stat: 0.303665 (lower is better) access: 0.165468 (lower is better)
Attachments
Benchmark (1.76 KB, text/x-csrc)
2018-05-22 13:52 PDT, Chris Dumez
no flags
Patch (1.79 KB, patch)
2018-05-22 13:54 PDT, Chris Dumez
no flags
Patch (1.80 KB, patch)
2018-05-22 14:06 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2018-05-22 13:54:55 PDT
Chris Dumez
Comment 2 2018-05-22 14:06:57 PDT
Chris Dumez
Comment 3 2018-05-22 14:35:34 PDT
Benchmark results on another macOS machine (Mac Pro instead of MacBook Pro): stat: 0.345526 (lower is better) access: 0.20872 (lower is better) stat: 0.34333 (lower is better) access: 0.208695 (lower is better)
Geoffrey Garen
Comment 4 2018-05-22 16:26:18 PDT
Comment on attachment 341020 [details] Patch r=me
WebKit Commit Bot
Comment 5 2018-05-22 16:54:09 PDT
Comment on attachment 341020 [details] Patch Clearing flags on attachment: 341020 Committed r232088: <https://trac.webkit.org/changeset/232088>
WebKit Commit Bot
Comment 6 2018-05-22 16:54:11 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2018-05-22 16:55:23 PDT
mitz
Comment 8 2018-05-22 17:12:46 PDT
Neat!
Note You need to log in before you can comment on or make changes to this bug.