Recent

Author Topic: Disk activity?  (Read 556 times)

nanobit

  • Jr. Member
  • **
  • Posts: 85
Disk activity?
« 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?

winni

  • Hero Member
  • *****
  • Posts: 1899
Re: Disk activity?
« Reply #1 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

Handoko

  • Hero Member
  • *****
  • Posts: 3865
  • My goal: build my own game engine using Lazarus
Re: Disk activity?
« Reply #2 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

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8785
  • FPC developer.
Re: Disk activity?
« Reply #3 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.


nanobit

  • Jr. Member
  • **
  • Posts: 85
Re: Disk activity?
« Reply #4 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.

PascalDragon

  • Hero Member
  • *****
  • Posts: 2259
  • Compiler Developer
Re: Disk activity?
« Reply #5 on: July 08, 2020, 03:20:00 pm »
That's why I exclude the whole source directory ;)

 

TinyPortal © 2005-2018