[Patch] Faster access on zip boundaries

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Patch] Faster access on zip boundaries

Gerd Petermann
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

zipaccess.patch
Reply | Threaded
Open this post in threaded view
|

Re: [Patch] Faster access on zip boundaries

WanMil
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-tp5551185p5551185.html
> Sent from the Mkgmap Development mailing list archive at Nabble.com.
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Patch] Faster access on zip boundaries

Gerd Petermann
Hi WanMil,

> Date: Fri, 9 Mar 2012 23:17:24 +0100

> From: [hidden email]
> To: [hidden email]
> 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

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev