Open Therzok opened 5 years ago
Looking at recent profiling traces, we should implement a smart FileSystem implementation to avoid IO in unnecessary cases.
In example, a custom IFileSystem
could cache the result of File.Exists, and invalidate it on FileSystemWatcher
changes.
Also considered Microsoft.Extensions.FileProviders, but it's lacking on many fronts (performance wise)
It's a good helper for testing filesystem access and mocking faults like invalid permissions.
Also, could help with swappable filesystem backends (mmap, ram, sqlite db, doing IO only once then caching the values, etc) - i.e. perf testing different implementations