Closed isoos closed 6 years ago
Thoughts, @nex3 ?
I'm happy to go all async here – but that also has runtime costs and makes debugging harder.
Maybe just use async when the operation could be long?
My experience has generally been that the overhead of async IO is high enough that it doesn't provide a meaningful performance benefit, even in the presence of some amount of parallelism. I wouldn't advise doing this without benchmarks that show a concrete benefit.
I stand corrected. The change was easy (I can send PR if interested), but the performance benefits were not measurable on my Linux server with a fast SSD, and were under 1-5% difference between the two. Not sure if a slower HDD would show a difference. On a Mac notebook the benchmark's result varied more than 30% between consecutive measurements, so I've discarded that.
All use of sync*
has been removed from this repo.
They are blocking other processing that could go on while the file or directory is being read.