Modify

Opened 10 years ago

Closed 9 years ago

#11929 closed defect (fixed)

Low JOSM performance when mapillary layer is active with large sequence

Reported by: wiktorn Owned by: nokutu
Priority: normal Milestone:
Component: Plugin mapillary Version: latest
Keywords: performance Cc:

Description

When I download larger area and work with Mapillary layer I observe lower performance of scrolling/panning and drawing. After short profiling session I observed a lot of calls to:
MapillaryImage.equals(...)

I identified following source of this calls:
*while painting the layer there is iteration over sequences. But MapillarySequence.next(...) calls ArrayList.contains(...), which is O(n), as well as ArrayList.indexOf(...), which is also O(n), and in the end - calls MapillaryImage.equals(...) * n (length of sequence)

My guess is, that if you'd have constant-time MapillaryAbstractImage.next(...) this would improve performance dramatically.


Attachments (1)

rower.gpx (388.8 KB ) - added by wiktorn 10 years ago.
Example gpx, where you can see performance problems

Download all attachments as: .zip

Change History (4)

comment:1 by nokutu, 10 years ago

I see... Then I'll try to improve it. I don't have much time at the moment so I will probably do this and a couple of other bugfixes during christmas holidays.

Thanks

by wiktorn, 10 years ago

Attachment: rower.gpx added

Example gpx, where you can see performance problems

comment:2 by Don-vip, 10 years ago

Keywords: performance added

comment:3 by nokutu, 9 years ago

Resolution: fixed
Status: newclosed

I've changed the ArrayList by Sets created by using:

Set<Foo> set = Collections.newSetFromMap(new ConcurrentHashMap<Foo, Boolean>);

Therefore, performance with big sets should be significantly improved.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain nokutu.
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.