I've started to work in home office and connected my Windows 10 PCs to the network drives in the company through VPN. I noticed there was a lot of traffic on the VPN and tried to find out why. I noticed that when I open a directory with the Windows Explorer on a network drive the data transfer is raised by hundreds of MB. So I started some tests. I disabled all Virus Scanners and so on, which might access the network drive and made multiple duplicates of the same file until i had 1GB in a directory. I made one directory with only PDFs, one with a executable from another company and one with executables made by me. A standard Delphi XE application. What I found out:
I tried to find out why there is a difference between the two executables or what exactly is happening, but couldn't find out why and how to solve this.
While I'm not sure about this I'm guessing that the cause for this is the size of resource section of Delphi executables.
You see most other compilers create executables with pretty small resource sections which contain only executable icons, version information and included manifest file.
Delphi on the other hand stores much more information in that resource section like:
Because of all this the resource section of Delphi files can easily exceed several MB in size. You can use one of various PE resource viewers or resource editors to get better idea of what exactly is stored in resource sections of Executable files. I most commonly use PE Explorer for this.
And since Windows has to retrieve entire resource sections in order to be able to extract executable icons this causes so much network traffic when opening a network folder with lots of executables that were built with Delphi.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.