[Patch] Faster access on zip boundaries

Hi WanMil, attached is a small patch that tries first to locate the wanted *.bnd file directly. Only if that fails, the whole directory is searched sequentially. When you provide precompiled boundaries in the new format, please make sure that the zip doesn't contain a directory structure. Gerd http://gis.19327.n5.nabble.com/file/n5551185/zipaccess.patch zipaccess.patch -- View this message in context: http://gis.19327.n5.nabble.com/Patch-Faster-access-on-zip-boundaries-tp55511... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Gerd, sounds good. I've commited it. Did you ever measure how long it takes to instantiate a ZipFile? Each time a bnd file is loaded the ZipFile is instantiated. If that takes too long it might be better to instantiate it once and then reuse it. WanMil
Hi WanMil,
attached is a small patch that tries first to locate the wanted *.bnd file directly. Only if that fails, the whole directory is searched sequentially. When you provide precompiled boundaries in the new format, please make sure that the zip doesn't contain a directory structure.
Gerd
http://gis.19327.n5.nabble.com/file/n5551185/zipaccess.patch zipaccess.patch
-- View this message in context: http://gis.19327.n5.nabble.com/Patch-Faster-access-on-zip-boundaries-tp55511... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi WanMil,
Date: Fri, 9 Mar 2012 23:17:24 +0100 From: wmgcnfg@web.de To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] [Patch] Faster access on zip boundaries
Hi Gerd,
sounds good. I've commited it.
Did you ever measure how long it takes to instantiate a ZipFile? Each time a bnd file is loaded the ZipFile is instantiated. If that takes too long it might be better to instantiate it once and then reuse it.
I did not measure it, but it seems to be very fast, because in I don't see it in the profiling tools that I use. Afaik it is memory mapped, so maybe the very first access is much slower. Gerd
participants (3)
-
Gerd Petermann
-
GerdP
-
WanMil