Jump to content

ZIP library speed


Recommended Posts

It appears it was "my bad" - or was it. I had a VI that extracted "all files one-by-one" instead of calling the OpenG "Expand ZIP". But I don't understand where the difference comes from (20 seconds vs X minutes). On inspection my VI didn't have any errors that would account for such a difference.

Is "Extract single file from ZIP" really that much slower?

Br, Miha

Link to comment

It appears it was "my bad" - or was it. I had a VI that extracted "all files one-by-one" instead of calling the OpenG "Expand ZIP". But I don't understand where the difference comes from (20 seconds vs X minutes). On inspection my VI didn't have any errors that would account for such a difference.

Is "Extract single file from ZIP" really that much slower?

Br, Miha

Hi mike5,

I'm not that deep in ZIP, but as far as I remember, ZIP files store their content in blocks.

If you create a large ZIP in one solid block (which is very common), it is always neccesary to extract the whole ZIP in order to get one single file.

So, for your question:

Extracting one single file is not really slower, but used on a solid ZIP, it takes the same time as extracting all at once.

If you extract 2 files one-by-one, it would take double time!

It might be much faster, if you build a ZIP with a block size of e.g.: 2MB for a huge amount of small files, so you would

be able to extract a single file in less time.

Please correct me, if I'm wrong :rolleyes:

Greetings, LogMAN

Link to comment

It appears it was "my bad" - or was it. I had a VI that extracted "all files one-by-one" instead of calling the OpenG "Expand ZIP". But I don't understand where the difference comes from (20 seconds vs X minutes). On inspection my VI didn't have any errors that would account for such a difference.

Is "Extract single file from ZIP" really that much slower?

Br, Miha

Well not really sure about the block size mentioned by the other poster, but the ZIP Library has gone through some optimizations for sure. If you extract each file seperately by reopening the archive each time, you impose a huge performance hit. The global directory has to be traversed each time and the particular file be searched in it. The ZIP library routine to extract the entire archive in one go only opens the ZIP archive once and then traverses the directory listing once to retrieve one file after the other. Since it already has the right directory entry handy it also doesn't have to look it up again each time.

Multiminute delays does seem a bit excessive however, but if it was an archive with many small files it may be explainable.

Link to comment

How about checking attributes of each file I'm extracting? IIRC ZIP archive stores all file information at the end of an archive. Because I'm not reopening the archive for each file...

Anyhow, all this has got to do with the folder separator on PXI-RT (discussed here), so we'll patch the OpenG ZIP library to do this correctly, and the problem should go away...

Br, Mike

Link to comment

This might be slightly off topic, but is there a 64-bit compatible version of this ZIP library? I really like the ability to extract a single file and the ability to save to a zipped string (I don't think NI's toolkit has this yet), but since everything's moving to 64-bit here, I had to change over to the NI ZIP libraries which are a lot more cumbersome.

Thanks,

Bruce

Link to comment

This might be slightly off topic, but is there a 64-bit compatible version of this ZIP library? I really like the ability to extract a single file and the ability to save to a zipped string (I don't think NI's toolkit has this yet), but since everything's moving to 64-bit here, I had to change over to the NI ZIP libraries which are a lot more cumbersome.

Thanks,

Bruce

Using OpenG Zip Tools On 64-bit LabVIEW

I think they are waiting for Rolf to find some time :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.