Hi Larry,
Thanks for the link,
I was just looking for it.
I found also this thread, but this is not strictly the same problem.
Anyway, it should be good to test again those cases :
http://groups.google.com/group/openjump-users/browse_thread/thread/55e12e96507f3b80/fb152c3d3f87d88d%3Fq%3D%2522Becker%2BBecker%2522%23fb152c3d3f87d88d&ei=iGwTS6eaOpW8Qpmqic0O&sa=t&ct=res&cd=4&source=groups&usg=AFQjCNEJRegXqGvSzL2nLwg1KQYKUoCaqA
Michaël
Hi Michaël,
Do you think this optimization will have an effect on the "Shapefile
with overlapping shells" issue that we worked in 2008?
see:
http://www.mail-archive.com/jump-pilot-devel@lists.sourceforge.net/msg04403.html
regards,
Larry
2012/4/20 Michaël Michaud <michael.mich...@free.fr
<mailto:michael.mich...@free.fr>>
Hi,
Here are some test cases done with a 200 Mb shapefile (thanks Jukka)
containing : 221770 polygons
worst case : 287273 pts and 5484 holes
Dataset : Current OJ code / 1st Martin's optimization / 3rd
Martin's optimization / 1st+3rd
whole shapefile : 41 s / 24 s / 24 s / 11 s
worst polygon : 4.6 s / 0.16 s / 3.3 s / 0.13 s
==>
1st optimization has a big impact on worst case and a medium
impact on a whole file with mixed cases
3rd optimization has a small impact on worst case and a medium
impact on a whole file with mixed cases
I'll commit the 3rd optimization anyway has it has no side effect.
For the 1st one, i'll try to check if it may have negative impact
on some shapefile (if I can find or produce such shapefiles)
regards,
Michaël
Hi Martin,
The performance improvement from just #1 was dramatic - reading a 1M
feature shapefile went from over 1000 s to 32 s.
Wonder how complex your shapefile is.
It took me hours to create the following 65Mo shapefile, but it
has been loaded in 11 s only
Min Max Moyenne Total
Pts 4 398604 3492.4928774928776 3677595
Trous 0 4804 37.41310541310541 39396
Composants 1 71 1.8034188034188035 1899
Surface 0.041523783176671714 1.1578715743783949E7
93654.73981537568 9.86184410255906E7
Longueur 1.553765588506568 456680.2181261205
4068.589468188681 4284224.710002681
Michaël
Wow, your polygon should be really complex !
Will do some test and I'll report my results on this list.
Michaël
----------------------------
PolygonHandler change:
((ArrayList) holesForShells.get(findIndex(shells,
minShell))).add(testHole);
/**
* Finds a object in a list. Should be much faster than indexof
*
* @param list
* @param o
* @return
*/
private static int findIndex(ArrayList list, Object o)
{
int n = list.size();
for (int i = 0; i< n; i++) {
if (list.get(i) == o)
return i;
}
return -1;
}
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
<mailto:Jump-pilot-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
<mailto:Jump-pilot-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
<mailto:Jump-pilot-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
<mailto:Jump-pilot-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel