Opened 7 years ago
Closed 7 years ago
#15408 closed enhancement (fixed)
[Patch] plugin download_along is very slow when computing download area for complex multipolygon
Reported by: | GerdP | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin download_along | Version: | |
Keywords: | performance | Cc: |
Description
The plugin calculates the download area by adding rectangles to a java.awt.geom.Area.
This calculation gets slower and slower the more complex the area gets.
It is much faster to use a Path2D instead and do the area calculation only once.
For the ways of a complex multipolygon like relation 3894648 with ~4000 nodes the unpatched code needs 40 secs while the patched version needs ~3 secs to calc the download area.
The patch implements this change and also changes some deprecated method calls.
Attachments (2)
Change History (7)
by , 7 years ago
Attachment: | perf.patch added |
---|
comment:1 by , 7 years ago
follow-up: 3 comment:2 by , 7 years ago
OK, I guess I have to find out the 1st release that introduced the new methods?
comment:3 by , 7 years ago
Replying to GerdP:
OK, I guess I have to find out the 1st release that introduced the new methods?
Each (except older) class and function has a "since" information. So when using a new one you simply need to rember increasing the number. When done during development it is no additional work. See doc.
comment:4 by , 7 years ago
Yes, that's what I used to create the new patch. I've also checked out r12643 and compiled it to make sure that the plugin works with that build.
comment:5 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in [o33710:33711]. Thank you!
For the deprecation fixes: When using new methods please also fix build.xml to contain the new minimum JOSM version.