Missing File IO markers for GetDirectoryEntries
Categories
(Core :: Gecko Profiler, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | affected |
People
(Reporter: Gijs, Unassigned)
References
(Blocks 1 open bug)
Details
Calling GetDirectoryEntries and then GetNextFile() does IO, because it gets file names off disk given a directory.
However, we don't seem to currently have markers for this.
To test, record a startup profile. Find the marker (in the main process, main thread) for access to default/prefs/channel-prefs.js . That's from https://searchfox.org/mozilla-central/rev/6db0a6a56653355fcbb25c4fa79c6e7ffc6f88e9/modules/libpref/Preferences.cpp#4477-4503 and https://searchfox.org/mozilla-central/rev/6db0a6a56653355fcbb25c4fa79c6e7ffc6f88e9/modules/libpref/Preferences.cpp#4209 . Note the time, clear the filter, and look for earlier IO markers. There aren't any related ones for that directory, that I can see. There ought to be.
In the channel-prefs.js case, of course the opening of one of these files acts as a "canary" to the overall IO happening here, but I expect that just iterating over the directory has a cost. It'd be interesting to know whether the IO cost is linear with the number of files, or constant per directory, or linear with files / <some number of files that go in a page/buffer/whatever>, or something else, and if there are other places where we look for files and don't end up finding any which we open/read, but do incur a cost for looking for those files.
Updated•2 years ago
|
Description
•