How to split large files efficiently

前端 未结 5 2247
挽巷
挽巷 2020-12-05 04:38

I\'d like to know how I can split a large file without using too many system resources. I\'m currently using this code:

public static void SplitFile(string i         


        
5条回答
  •  -上瘾入骨i
    2020-12-05 05:22

    Currently this operation max's out my systems HDD IO usage at 100%.

    This is logical - the IO is going to be your limiting factor, and your system probbably has the same crappy IO of most computers (one slow disc, not a RAID 10 of high performance discs).

    You can use a decent chunk sze (1mb upward) to reduce small reads and writes, but at the end that is al you CAN do. Or get a faster disc subsystem.

提交回复
热议问题