Modify

#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 22 months ago.
perf-v2.patch (5.2 KB) - added by GerdP 22 months ago.
plugin needs JOSM r12643 or newer

Download all attachments as: .zip

Change History (7)

Changed 22 months ago by GerdP

Attachment: perf.patch added

comment:1 Changed 22 months ago by stoecker

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

comment:2 Changed 22 months ago by GerdP

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

Changed 22 months ago by GerdP

Attachment: perf-v2.patch added

plugin needs JOSM r12643 or newer

comment:3 in reply to:  2 Changed 22 months ago by stoecker

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 Changed 22 months ago by GerdP

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 Changed 22 months ago by Don-vip

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.