Lazarus

Free Pascal => FPC development => Topic started by: nanobit on July 05, 2020, 04:23:08 pm

Title: Disk activity?
Post by: nanobit on July 05, 2020, 04:23:08 pm
Does the compile/build process apply good internal optimizations to reduce disk activity,
I mean whole file data is created/changed/used/shared in RAM before final write to disk?
Title: Re: Disk activity?
Post by: winni on July 05, 2020, 05:03:10 pm
  Hi !

Modern filesystem wite the data into their cache.
If there is CPU time available they write is to disk.
This is true for Linux and now also for Windows.

So you don't have to care.

Winni
Title: Re: Disk activity?
Post by: Handoko on July 05, 2020, 06:57:07 pm
Microsoft has already known such technology for more than 30 years. But the early version need to be manually loaded through a CONFIG.SYS. I wrote a tool to generate reports that needs frequently save and load data from disk. It took more than 10 minutes but after using SmartDrive, it just needed about a minute.

Such old but useful technology must be already implemented and loaded automatically by nowadays OSes.

https://en.wikipedia.org/wiki/SmartDrive
Title: Re: Disk activity?
Post by: marcov on July 05, 2020, 07:33:37 pm
Modern filesystem wite the data into their cache.
If there is CPU time available they write is to disk.
This is true for Linux and now also for Windows.

Note that syscalls are still expensive, so bundling writes a bit does help, specially with larger files.

Title: Re: Disk activity?
Post by: nanobit on July 08, 2020, 12:46:39 pm
Also part of disk activity during building, Windows Defender occasionally scans
even all source files at the time when FPC reads them. Thus the exclusion
of unit output folders (FU) is not enough. But I don't exclude exe/dll files.
Title: Re: Disk activity?
Post by: PascalDragon on July 08, 2020, 03:20:00 pm
That's why I exclude the whole source directory ;)
TinyPortal © 2005-2018