Modify ↓

Opened 8 weeks ago

Closed 4 hours ago

#24876 closed enhancement (fixed)

[patch] Improve PowerLines test performance

Reported by: gaben Owned by: team
Priority: normal Milestone: 26.09
Component: Core validator Version:
Keywords: Cc: GerdP

Description

While working on #24851, I discovered some inefficiencies. In my tests, I managed to make the test run approximately 8 times faster.

I'll work on the patch to make sure nothing broke, because I'm a bit suspicious.

The patch will follow soon. Ping me if I forget.

Attachments (1)

24876-v2.patch​ (7.2 KB ) - added by gaben 7 days ago.

Download all attachments as: .zip

Change History (5)

by gaben, 7 days ago

Attachment: 24876-v2.patch​ added

comment:1 by gaben, 7 days ago

Summary: Improve PowerLines test performance → [patch] Improve PowerLines test performance

Something like this. Avoiding the per-node evaluation of findCrossings() gives an 8x performance increase on my test data with the same output.

There are also some memory allocation improvements.

Last edited 7 days ago by gaben (previous) (diff)

comment:2 by gaben, 7 days ago

Milestone: → 26.09

comment:3 by stoecker, 27 hours ago

Apply?

comment:4 by gaben, 4 hours ago

Resolution: → fixed
Status: new → closed

In 19658/josm:

fix #24876 - improve PowerLines test performance

The test looked up the water crossings of the whole way once for every node of the way, although the result only depends on the way.
On a large power line dataset (~500k primitives), a full run of the test goes from ~8.2s to ~0.9s, with identical results.

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.