I soon will have a folder with thousands of files, each file on the order of a few KB. I will need to transfer these across a Windows network from one UNC share to another. In general, is it faster to simply copy the files over en masse, or would it be faster to zip them up (e.g., using 7zip in fastest mode) and send one or a few large files? Or is there no difference in practice?
It is faster to transfer a single large file instead of lots of little files because of the overhead of negotiating the transfer. The negotiation is done for each file, so transferring a single file it needs to be done once, transferring n files means it needs to be done n times.
Jon Cahill is very correct, a single file will be faster. However it's worth keeping in mind that if there is any instability in the connection, individual files (or medium-sized groups in zip files) may be better, because if the transfer fails you'll have to start all over again, whereas with multiple files you will just have to re-do the last file started
The average packet size relative to average file size is probably critical here. With lots of small files you may find yourself sending out many tiny packets. Tiny packets still incur TCP overhead; you could wind up doubling the amount of traffic as a result.
It's also worth remembering that the choice of protocol affects the overall time to complete - for example, to FTP files from one host to another, can be noticeably faster than using windows file sharing (of course, things like domain permissions and the like are also lost, but in some situations, this can be an acceptable trade off -- After all, these would also be lost by zipping/unzipping)
I have multiple 3 GB tab delimited files. There are 20 million rows in each file. All the rows have to be independently processed, no relation between any two rows. My question is, what will be faster?
Any way to speed things up in parallel? Right now I am using the former method and the process is very slow. Is using any CSVReader module going to help?I don't have to do it in python, any other language or database use ideas are welcome.
Still, it's worth checking that you really are I/O bound, instead of just guessing. Run your program and see whether your CPU usage is close to 0% or close to 100% or a core. Do what Amadan suggested in a comment, and run your program with just pass for the processing and see whether that cuts off 5% of the time or 70%. You may even want to try comparing with a loop over os.open and os.read(1024*1024) or something and see if that's any faster.
Meanwhile, assuming you're on a 64-bit system, you may want to try using mmap instead of reading the file in the first place. This certainly isn't guaranteed to be better, but it may be better, depending on your system. For example:
MASV is a secure cloud software company designed to quickly transfer heavy media files worldwide to meet fast-paced production schedules. Global media organizations rely on MASV to automatically deliver their large files without any restrictions, allowing them to concentrate on their next big deliverable.
MASV is an ISO 27001 and SOC 2 certified secure file transfer solution. All MASV transfers are encrypted in-flight and at-rest. Users can choose to password-protect every transfer. And MASV is validated by the Trusted Partner Network \u2014 a detailed security assessment led by the Motion Picture Association.
Subscription models charge a monthly fee regardless if you use the service or not. These services will often split up their features into separate pricing tiers and impose restrictions on their cheaper plans.
With MASV's PAYG transfer plan, users pay a flat fee of $0.25 for every gigabyte downloaded. If a file is not downloaded, the user is not charged, which is great for video teams and freelancers who work in fluctuating project environments. MASV also offers a transfer log so users can invoice individual transfers back to their clients.
MASV offers seamless integration with a number of popular apps. From storage providers like Google Drive, Dropbox, and Amazon S3; to productivity tools like Slack and Microsoft Teams; to media-specific tools like Frame.io and Adobe Premiere Pro.
MASV is simple enough for anyone to use. Simply sign up for an account and drag-and-drop your files and folders into either the MASV browser or Desktop app. During upload, you can write a short message to your recipient, set an expiry date for your transfer, and add a password. MASV can send up to 15 TB per file as an email or a share link. You can learn more in this video.
A smart editor will determine many factors to decide which strategy is the best to use. For example instead of reading the file line-by-line or byte-by-byte like a stupid editor it'll load into a big buffer for fast reading later. Or it can map the file to memory. But how big should the buffer or the map area be? It depends on each specific case and the editor should also account for that. Instead of loading a whole several-GB file into memory and stuck because that simply doesn't fit in, a smart editor just checks the file size and loads only the currently viewing part then seek later when needed.
It's also confirmed that Notepad does use memory-mapped file, but that's the beginning part. The difficult thing is to parse the line and do the line wrapping. Even Notepad++ sucks when opening super huge files. See Poor performance with large .txt
Notepad is little more than a shell around the Windows Edit control. It was designed for editing small amounts of text and was optimized for such. Early versions had to run in systems with very limited resources where these optimizations were important. Windows 95 had an official requirement of only 4 MB RAM and for technical reasons the Edit control was limited to 64K of text. The NT platform was not so limited but it too had to work with limited resources.
Designing an editor for small files is relatively simple. Designing one that works efficiently with large files is anything but simple and requires a great deal of complex code. Small and simple editors do not work well with large files. All such editors, not just notepad, will choke on multi gigabyte files, even on a powerful computer. Some advanced editors can handle this with ease.
Notepad still works well for it's intended purpose and has had few changes over the years. The Windows Edit control is used in some form in most Windows applications so the potential for incompatibilities is great if major changes were made. Why take the chance of making unnecessary changes? Experience has shown that the most trivial of changes can cause incompatibilities in applications
I want to delete a folder that contains thousands of files and folders. If I use Windows Explorer to delete the folder it can take 10-15 minutes (not always, but often). Is there a faster way in Windows to delete folders?
The worst way is to send to Recycle Bin: you still need to delete them. Next worst is shift+delete with Windows Explorer: it wastes loads of time checking the contents before starting deleting anything.
The best I've found is a two line batch file with a first pass to delete files and outputs to nul to avoid the overhead of writing to screen for every singe file. A second pass then cleans up the remaining directory structure:
This is a regular task for me, so I usually move the stuff I need to delete to C:\stufftodelete and have those del+rmdir commands in a deletestuff.bat batch file. This is scheduled to run at night, but sometimes I need to run it during the day so the quicker the better.
use the command prompt, as suggested. I figured out why explorer is so slow a while ago, it gives you an estimate of how long it will take to delete the files/folders. To do this, it has to scan the number of items and the size. This takes ages, hence the ridiculous wait with large folders.
Our custom-made UDP transfer acceleration protocol enables you to achieve blistering fast file transfer rates. Available for both Windows and Mac. Benchmarking shows we are faster than most file sharing services.
Customize and brand your Filemail account and custom subdomain, so it is visually the same as your company brand. Use your logo, images and colour scheme of your choice. Modify further with HTML and Javascript.
With our file transfer app for iPhone and iPad you can send large files and videos to anyone with an email account. Alternatively you can upload the files and share the link wherever you want. There is no need to register to use our free service.
Use our Android file transfer app to send files for free. No registration is required to send files of up to 5 GB. If you need to send bigger files, just get out a subscription, and enjoy many more benefits such as 1 Tb storage, password protection, and longer storage duration.
c80f0f1006