Reserve disk space before writing a file for efficiency

前端 未结 6 708
情书的邮戳
情书的邮戳 2020-12-14 19:42

I have noticed a huge performance hit in one of my projects when logging is enabled for the first time. But when the log file limit is reached and the program starts writing

6条回答
  •  抹茶落季
    2020-12-14 20:03

    wRAR is correct. Open a new file using your favourite library, then seek to the penultimate byte and write a 0 there. That should allocate all the required disk space.

提交回复
热议问题