Lazarus
Free Pascal => FPC development => Topic started 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?
-
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
-
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
-
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.
-
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.
-
That's why I exclude the whole source directory ;)