whatwg / fs

File System Standard
https://fs.spec.whatwg.org/
Other
222 stars 19 forks source link

Using F_FULLFSYNC for flush() causing slow performance on Mac #156

Open dslee414 opened 7 months ago

dslee414 commented 7 months ago

What is the issue with the File System Standard?

Chromium uses F_FULLFSYNC for handle.flush() on Mac, for which we have received feedback on noticeably slow performance, compared to other browsers: https://crbug.com/1440778

In most use cases, flush() shouldn't or wouldn't be called too often, but perhaps there might be some advanced use case such as the one reported in the chromium bug above.

In any case, we could consider making full-sync behavior configurable at API-level, but not quite sure how this would fit into API, given that it is OS-specific behavior, and also at what granularity. Alternatively, Chromium could consider not using F_FULLFSYNC without any API changes, but that would also introduce divergence between Mac and Windows.

Any thoughts?

annevk commented 7 months ago

cc @whatwg/storage