Closed snakex64 closed 3 years ago
Hi @pascx64 ,
If I remember normally only a part of the file should be read in that case. Have you look if you get the same behaviour with the mirror C sample ? You can also use procmon to see if the same ReadFile happens on NTFS.
Hi @Liryna ! Thanks for the very fast reply,
I does seems like it behave the same with the Dokan-dotnet mirror sample. Except it freeze for a fraction of the time since the file is local, still freeze for a good 1-2s for a 1gb executable. The issue seems to only be with executables.
As for the mirror C sample, it is hard to say. it is definitely slower to right click on an executable versus a normal file but less slow than with dokan-dotnet.
It is also notable that in a normal folder ( outside of dokan ), right clicking on an executable is near-instantaneous, like it is when I right click on a normal file in dokan.
@pascx64 Please try with procmon and compare the type of read like offset and size.
For information, it is explorer in that case that create those reads or another app. Dokan is only getting them and forward them to the user filesystem. If it is the exact same read that on NTFS (by looking at procmon logs), will need to see what is making it slow.
I think the reads are still there even directly in the file explorer outside Dokan. It's just that it's slowly ( and therefor visible ) with Dokan-dotnet mirror sample. And since my program is accessing everything remotely it's very slow
@pascx64 This is expected in that case. You would need a caching that would help to fastly reply to explorer. Lik reading a head of the file at first read-.
Hi!
I am assuming there is something wrong either with my code or in Dokan. When I right click a file in the Windows Explorer, it freeze until the entire file has be "read", I can see the "ReadFile" method called repeatedly. For big files it can freeze for quite a while before the right click menu opens.
Is there a way to go around this ?
Thanks,