Modify

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)

perf.patch (4.5 KB ) - added by GerdP 7 years ago.
perf-v2.patch (5.2 KB ) - added by GerdP 7 years ago.
plugin needs JOSM r12643 or newer

Download all attachments as: .zip

Change History (7)

by GerdP, 7 years ago

Attachment: perf.patch added

comment:1 by stoecker, 7 years ago

For the deprecation fixes: When using new methods please also fix build.xml to contain the new minimum JOSM version.

comment:2 by GerdP, 7 years ago

OK, I guess I have to find out the 1st release that introduced the new methods?

by GerdP, 7 years ago

Attachment: perf-v2.patch added

plugin needs JOSM r12643 or newer

in reply to:  2 comment:3 by stoecker, 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 GerdP, 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 Don-vip, 7 years ago

Resolution: fixed
Status: newclosed

Fixed in [o33710:33711]. Thank you!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.