View Single Post
Old 06-14-2010, 03:23 PM   #18
luite
Connoisseur
luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.
 
Posts: 82
Karma: 256
Join Date: Feb 2010
Location: Netherlands
Device: dr1000
Quote:
Originally Posted by Gwaihir View Post
That's correct.
Alternatively, perhaps the indexing can be enhanced in such a way that a folder containing a website can register as just one document. It would save the continuous unzipping. I fear that unzipping might be a drain on the battery, but I could be wrong.
Actually unzipping files takes very little time. The reason that the previous version was slow is that it had to go through all files in the zip directory (the list of all files in the zip archive) to find each file.

This update fixes this, it loads the list of files in a binary tree when the archive is opened, so that each file can be found quickly. I've tested it with a 2.5MB archive with 1200 files, and a 215MB archive with 12000 files. Both are very fast now, although the latter takes a bit longer to open.

Note: When upgrading, just overwrite existing files. You don't need to run the script to associate the file types again.

Small update: I also tested it with a zip archive with around 61000 files and it still works well. The archive takes slightly longer to open, since the program scans the whole central directory, so it takes a little more time to load the first page, but after that, it's very fast. Since the original zip format only supports up to 65536 files, I'll update the next version to support the newer ZIP64 format, which removes this (and other) limitation.
Attached Files
File Type: zip Zipbrowser-0.1-preview3.zip (153.5 KB, 283 views)

Last edited by luite; 06-14-2010 at 09:40 PM.
luite is offline   Reply With Quote