Modify

Opened 14 years ago

Closed 14 years ago

#685 closed defect (fixed)

Very long running java.awt.Graphics.fillPolygon

Reported by: anonymous Owned by: framm
Priority: major Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

Steps:

  1. Opended GPX file with GPS tracks.
  2. Zoomed in a region of the loaded tracks
  3. Click the download button and leave all settings for the chosen bb.
  4. Start the download and wait.

Console output:
mappaint: Using jar's elemstyles.xml: "file:/E:/src/java/openstreetmap/JOSM/bin/styles/standard/elemstyles.xml"
download: http://www.openstreetmap.org/api/0.5/map?bbox=8.80530688924713,47.98263970762596,8.836373525759617,48.00380422883021
got return: 200

Attachments (3)

tracks_20080407.gpx (120.7 KB) - added by Yavin 14 years ago.
opened tracks
josm-render-speedup.diff (1.2 KB) - added by dnaber 14 years ago.
speed up using BufferedImage
josm-render-speedup.2.diff (2.4 KB) - added by dnaber 14 years ago.
next try, now hopefully supports more than one layer

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by Yavin

Attachment: tracks_20080407.gpx added

opened tracks

comment:1 Changed 14 years ago by yavin@…

Sorry forgot to format the description and to insert a meaningful name. This the first time I use JOSM and I debugged the code. The issue seems to be at MapPaintVisitor.drawWayAsArea(Way w, Color colour). Maybe I'm to new to be sure. But the problem is major. I have a 2 core intel chip. maybe this is a threading issue. Did you ever test the software on real multi core systems?

comment:2 Changed 14 years ago by dnaber

The problem is that the color uses an alpha channel, this makes rendering slow.

Changed 14 years ago by dnaber

Attachment: josm-render-speedup.diff added

speed up using BufferedImage

comment:3 Changed 14 years ago by dnaber

Sorry, the patch is broken as it only supports one layer, i.e. you cannot see several layers at once.

Changed 14 years ago by dnaber

Attachment: josm-render-speedup.2.diff added

next try, now hopefully supports more than one layer

comment:4 Changed 14 years ago by framm

Resolution: fixed
Status: newclosed

patch applied, thanks.

as pointed out by dnaber on the list, we can still do better by avoiding to draw the stuff that is known to be off-screen but that's on my list anyway so I take the liberty to close this bug.

Modify Ticket

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