struct

Pylon::Write::Writer(F, S)

Inherits Struct < Value < Object

Constants

DEFAULT_PARALLELISM = Platform.select do macos do 2 end linux do System.cpu_count.to_i * 2 end end

APFS contends on staged writes past ~4 workers, 2 was the measured as being the most optimal. ext4 on Linux didn't seem to have the same problem so just leaving it to scale by CPU count for now.

PARALLEL_THRESHOLD = 16

Constructors

new(filesystem : F, staging : S, cache : Scan::Cache, now_ns : Int64, ignores : Scan::Ignores, parallelism : Int32 = DEFAULT_PARALLELISM)
Source

Instance methods

write(changes : Core::Changes, relocations : Array(Core::Relocation) = Array(Core::Relocation).new) : Array(Outcome)
Source