I am currently working with HASYv2 dataset which contains the hasy-data directory with 168.233 images of size 32px x 32px. I just wanted to copy that directory with Caja, but I skipped this after about 5 minutes (and Ubuntu told me it would take another 10 minutes).

Copying the files with cp -a source_dir target_dir took less than 9 seconds.

However, creating a tar.bz2 archive, copying the archive, extracting the files was done within about 15 seconds (everything combined).

Why is that the case?

(Side questions: When I press Ctrl+C, Ctrl+V to copy files within Caja the copying process is started by Caja, right? Does it make sense to internally use a similar procedure if many files are about to be copied?)

  • I wonder how fast cp -a would have been. Possibly faster then the tar. Or perhaps there's a slow network involved so the reduced file size (due to the compression) outweighed the transfer time. Without some more context it's difficult to provide concrete answers. – roaima Feb 5 '17 at 15:31
  • @roaima cp -a was done in 8,17s (which is likely faster than tar was). I've copied it on one machine to the same disk on that machine. – Martin Thoma Feb 5 '17 at 15:45
  • 1
    So to clarify, Caja took about 15 minutes whereas cp -a took 8s for the same data? Then the question isn't why copying files is slow, but why Caja is slow at copying files. Please edit your question to clarify. I don't know Caja, but this may be because the files are images and it extracts metadata from the images when it sees them appear. – Gilles Feb 5 '17 at 21:21
  • @Gilles I've changed the title / the text a bit. – Martin Thoma Feb 5 '17 at 21:24
  • Oh, I forgot to mention: were the files in the cache after your first attempt? The difference could be that a read cache→write buffer copy is a lot faster than a disk→write buffer copy. – Gilles Feb 5 '17 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.