Disable caching for file copy and move actions
Moderators: Hacker, petermad, Stefan2, white
Disable caching for file copy and move actions
It would be nice if TC disables the windows filecache when file are copied or moved. I think the file cache shouldn't be used for copy and move actions because with large (or a lot of) files it causes application memory to be written to the pagefile... So afterwards my computer is very slow because the pagefile needs to be acessed wildly (while that's very rarely neccesary with my 512MB).
/geek mode:
Christian, you can do this by passing the FILE_FLAG_NO_BUFFERING flag to the CreateFile function for both source and destination files. You might also consider adding the options to write files using the FILE_FLAG_WRITE_THROUGH flag.
/geek mode:
Christian, you can do this by passing the FILE_FLAG_NO_BUFFERING flag to the CreateFile function for both source and destination files. You might also consider adding the options to write files using the FILE_FLAG_WRITE_THROUGH flag.
It's not a problem I can solve myself. It's also definately not a memory leak. It's just windows filecache, a feature which is a lot over-used even by windows itself.
FYI: I have the same symptons when copying or moving a large file (or a lot of smaller files) with any other program, even with the windows explorer.
The workaround is to open up some programs afterwards. Their files are being cached again, and the computer becomes faster. The filecache shrinks and physical memory available to application restores to normal.
The solution is more difficult and has to be implemented by the programmer, as I mentioned in my start post.
FYI: I have the same symptons when copying or moving a large file (or a lot of smaller files) with any other program, even with the windows explorer.
The workaround is to open up some programs afterwards. Their files are being cached again, and the computer becomes faster. The filecache shrinks and physical memory available to application restores to normal.
The solution is more difficult and has to be implemented by the programmer, as I mentioned in my start post.
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
I definitely understood you, but we are talking about memory consumption, where those parameters are playing a big part.Thany wrote:I was referring to the WINDOWS filecache, it doesn't have to do anything with TC, except for the fact that it can (and should!) be turned of for a certain files.
I switched to Linux, bye and thanks for all the fish!
- ghisler(Author)
- Site Admin
- Posts: 50839
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
When copying with these parameters:
CopyHugeBlockSizeOther
CopyHugeBlockSize
The Windows file cache will be bypassed.
CopyHugeBlockSizeOther
CopyHugeBlockSize
The Windows file cache will be bypassed.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com