[mkgmap-dev] [Patch] Faster BoundaryGrid
From GerdP gpetermann_muenchen at hotmail.com on Thu May 3 07:58:20 BST 2012
Hi WanMil, you are right, the patched code is a bit slower for the normal case. I see two solutions: 1) We don't allow directories in the zip file. With this restriction we can simply stop searching if the wanted bnd file is not found instead of traveling through thousends of entries. We can alarm the user when we find a directory structure within the zip. 2) We save the list that is created in LocationHook.init() and use it as a parm for the BoundaryGrid constructor. I'd prefer option 1, what do you think? Gerd GerdP wrote > > Hi WanMil, > > attached is a small patch which drastically improves BoundaryGrid for > tiles that contain mostly sea. I found such a tile in south-america, and > the patched version is > 10 times faster. > It contais a large part of the pacific, and BoudaryGrid searches the > boundary zip file for >> 5000 different *.bnd files, most of them do not exist in your >> bounds_20120401.zip , so the > code in BoundaryUtil searches through all elements of the zip file to find > out that it doesn't exist. > > The patch creates a HashSet first with the available files and calls the > load routine only for > those that exist. > > Gerd > http://gis.19327.n5.nabble.com/file/n5680180/BoundaryGrid.java.patch > BoundaryGrid.java.patch > -- View this message in context: http://gis.19327.n5.nabble.com/Patch-Faster-BoundaryGrid-tp5680180p5682445.html Sent from the Mkgmap Development mailing list archive at Nabble.com.
- Previous message: [mkgmap-dev] [Patch] Faster BoundaryGrid
- Next message: [mkgmap-dev] [Patch] Faster BoundaryGrid
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list