[libc-commits] [PATCH] D126829: [libc] add buffering to FILE writes
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jun 8 09:19:41 PDT 2022
sivachandra added a comment.
The idea of "split point" makes it almost equivalent to the split approach I proposed. Taking a step back and looking at it objectively, consider that once a file is in a buffering mode, it is in that mode for its life time. Likewise, FBF is a mode by itself but LBF is FBF plus something else. To reflect these conceptual notions in code, we should use the approach of building LBF over FBF. That will keep FBF and LBF implementations simple and focused. Quantitatively also, the current state of this patch demonstrates that mixing makes it more complicated than it was previously.
I was wrong in expecting that concepts like flush point would make the implementation simple so I apologize for the misleading feedback I have given earlier. To move forward, we will do this:
1. Use the split approach of building LBF over FBF as I have suggested earlier.
2. Fix any bugs in FBF implementation separately.
3. If and when some optimizations are required, we will optimize based on the data about what exactly the problem is.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libc-commits