-
-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inefficient extraction with drag and drop #353
Comments
+1 to this. I hope this issue is solved soon. |
Can you see if this is done on C itself to, im pretty sure this is a 7zip thing. |
You're right, this also happens with 7-zip 19.00. |
Hmm I would honestly find it cleaner to put the file in memory than add it to the users clipboard and then paste it into explorer. After paste restore previous clipboard content or and clear the files from clipboard history. The currently implementation is so clunky I hope someone whos more in touch with 7zip would have the time to look over it again. |
AFAIK all archiver software (7zip, WinRAR etc) do this when drag and dropping onto Windows Explorer. Read the link from @soredake above: to clarify, this is seemingly a Windows drag and drop limitation... unless maybe Windows 11 makes or will make in the future a relevant feature change. Maybe a clean solution that everyone missed until now could be found (can software possibly read the current path from the dragged-onto Windows Explorer window?), but probably, roundabout ways to workaround this limitation in archiver software could be devised but they'd be clunky technically themselves (perhaps you could even do it using something like a AHK script), so rather than that it's better for the user to be the one to workaround this instead if they care to, by using any other method to extract than drag and drop to Windows Explorer. Or the user could try placing their Temp directory (either system's temp folder or specific folder manually chosen in 7zip's settings as 'working folder) on a RAMdisk, which would make the issue not matter much. It's not so bad, this kind of thing is pretty much the system Temp folder's purpose... It doesn't really matter when you're not currently extracting a very large file or a huge amount of files (maybe the archiver could show an optional alert when the user tries to use Explorer drag'n'drop in these cases)... when you do, use another approach like the Extract command. You can right-click the path in an open Windows Explorer window and click "Copy address as text" to make this easier. |
Yup I read it, was stated it was an issue with 7zip |
That's unfortunate. I am now seeing this with other applications as well (e.g. VMWare). I suppose it's only most noticeable here because of the large amount of data extracted. Could there be some sort of dialog box providing a warning? |
I doubt it, it would be nice to have applications be more eco friendly. But here we are haha, I would recommend looking into ramdisk software if youre looking to extend the life of your SSD/nvme drives |
It's possible to implement it using a copy hook handler like WinSCP (see https://github.com/dinhngtu/DragNotifier). |
Thanks. I think I will reference your implementation in recent days if I understand the implementation. I will set git commit co-author-by with your mail. Kenji Mouri |
To clarify this skips writing to the temp directory on windows? |
Yes, that's the case. @MouriNaruto: I've made some basic tests (https://github.com/dinhngtu/NanaZip/tree/fastdrag). The extension works fine when unpacked, however, there are a couple problems with including it in NanaZip as MSIX:
Of course, installing with MSI would sidestep all of these problems. |
Should any checks be done to make sure no corruption occurs? I have network drives, and raid setup I could test 5tb+ transfers on. Is this only for dragging files out, or into archives too, or does this apply for all file ops done with nanazip? |
I don't think there's any issue dragging files into the archive. The problem of copying to a temp directory only happens when dragging out. I just tested this. |
I'm not sure I understand this part. What extension dll is it referring to? |
Copy handler class? |
@dinhngtu Hey was curious how implementation in regular 7zip would look like? Packaging as MSI makes more sense considering the tool is more for "power users", and if MSI was used would that get around the support issues for Windows 10? |
Ran into the same problem, when decompressing a large number of small files, you can't just drag and drop them directly, otherwise it will be too slow. I switched to HaoZip 52pojie version, which drags and drops in accordance with the working directory settings and can be written directly to the target directory. Wait for NanaZip to fix this problem and make it more in line with user habits than 7z |
When using drag-and-drop from the NanaZip window to Windows Explorer, NanaZip will extract to a temporary directory, which may be on a different disk than the destination. This necessitates an extra copy to transfer from disk to disk, as well as space on a disk that isn't even supposed to be used.
Here is an example:
I have a file, test.zip on drive D:
My main system drive is C:, and the temp folder is on this drive
I open D:\test.zip in NanaZip and drag some of its contents to D:\out
NanaZip will extract D:\test.zip to somewhere on C:\ before copying back to D:\out (confirm this in task manager)
When using the "Extract" button, this additional copy is not made.
I am not familiar with Windows drag-and-drop API, but if it is not possible to know the destination, there should be some warning about performance issues or an option to configure the drive to extract to.
NanaZip 2.0.450.0 x64 on Windows 11
The text was updated successfully, but these errors were encountered: