Modify

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#20799 closed defect (fixed)

Very slow to scroll geolocalized images

Reported by: StephaneP Owned by: team
Priority: normal Milestone: 21.08
Component: Core image mapping Version: latest
Keywords: template_report image viewer scroll regression Cc:

Description (last modified by StephaneP)

What steps will reproduce the problem?

  1. Load an image sequence
  2. Keep pressing the next image shortcut
  3. Compare scrolling speed between Josm latest and tested

What is the expected result?

Scrolling speed should be the same speed for both releases

What happens instead?

With the latest release, it's very slow. Perhaps it's related to #17072 or #20659 (no gamma/sharpness applied during the test)
See the attached video: At first I was using josm tested, then Josm latest.

Please provide any additional information below. Attach a screenshot if possible.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-04-23 21:32:22 +0200 (Fri, 23 Apr 2021)
Build-Date:2021-04-24 01:30:58
Revision:17814
Relative:URL: ^/trunk

Identification: JOSM/1.5 (17814 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19042)
Memory Usage: 5566 MB / 7218 MB (2602 MB allocated, but free)
Java version: 1.8.0_191-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252

Plugins:
+ Mapillary (1.5.37.6)
+ OpeningHoursEditor (35640)
+ PicLayer (2a9aa7a)
+ apache-commons (35524)
+ apache-http (35589)
+ areaselector (368)
+ austriaaddresshelper (1597341117)
+ cadastre-fr (35727)
+ continuosDownload (91)
+ contourmerge (v0.1.6)
+ ejml (35458)
+ geotools (35458)
+ javafx-windows (35655)
+ jaxb (35543)
+ jna (35662)
+ jts (35458)
+ log4j (35458)
+ opendata (35640)
+ photo_geotagging (35715)
+ photoadjust (35640)
+ reverter (35732)
+ tageditor (35640)
+ todo (30306)
+ turnlanes-tagging (288)
+ turnrestrictions (35640)
+ undelete (35640)
+ utilsplugin2 (35691)

Tagging presets:
+ %UserProfile%\Documents\Gitlab\preset-josm-collectivites\Presets-collectivités.xml

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://raw.githubusercontent.com/species/josm-preset-traffic_sign_direction/master/direction.mapcss
- %UserProfile%\Documents\GitHub\MapCSS-JOSM-Bicycle\cycleway.mapcss

Last errors/warnings:
- 00016.563 E: Failed to locate image 'object--wire-group'
- 00016.672 E: Failed to locate image 'regulatory--dual-lanes-cyclists-and-pedestrians--g1'
- 00017.107 E: Failed to locate image 'regulatory--texts--g1'
- 00017.108 E: Failed to locate image 'regulatory--texts--g2'
- 00017.217 E: Failed to locate image 'void--car-mount'
- 00017.218 E: Failed to locate image 'void--dynamic'
- 00017.219 E: Failed to locate image 'void--ego-vehicle'
- 00017.220 E: Failed to locate image 'void--ground'
- 00017.221 E: Failed to locate image 'void--static'
- 00017.371 E: Failed to locate image 'warning--kangaroo-crossing--g1'

Attachments (2)

image_scrolling.mp4 (5.8 MB ) - added by StephaneP 4 years ago.
image_layer.mp4 (1.2 MB ) - added by StephaneP 3 years ago.

Change History (14)

by StephaneP, 4 years ago

Attachment: image_scrolling.mp4 added

comment:1 by StephaneP, 4 years ago

Description: modified (diff)

comment:2 by skyper, 4 years ago

Keywords: image scroll regression added; slow removed
Version: latest

comment:3 by StephaneP, 4 years ago

If I insist to scroll the images, Josm-latest start to freeze, and it ends up with a crash.

in reply to:  3 comment:4 by skyper, 4 years ago

Replying to StephaneP:

Memory Usage: 5566 MB / 7218 MB (2602 MB allocated, but free)

Looks like lots of memory is used or at least already allocated. Doe you have enough physical memory on the machine to safely allow JOSM to use 7GB

Replying to StephaneP:

If I insist to scroll the images, Josm-latest start to freeze, and it ends up with a crash.

Might be a "Out of memory" problem or using too much virtual memory. A thread dump might help to tell more about the problem.

comment:5 by StephaneP, 4 years ago

Yes, I have 32GB on this machine.
With latest, I see these messages (josm launched with -Xmx8g) :
2021-04-25 15:04:48.282 SEVERE: Handled by bug report queue: java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Java heap space
and
2021-04-25 15:04:48.354 WARNING: Too many errors. Dropping ReportedException [thread=Thread[org.openstreetmap.josm.gui.layer.geoimage.ImageDisplay$LoadImageRunnable,6,main], exception=java.lang.OutOfMemoryError: Java heap space, methodWarningFrom=BugReportExceptionHandler#handleException]

With Josm-tested I can reproduce the same problem, but I need to scroll thru much more images before Josm complains.

With an older release (17056), I can't reproduce the problem, memory used grow much slower, and from time to time it decrease. This release don't crash, and the "scrolling" is smoother than tested or latest.

BTW : The Josm image viewer is still very very slow when you compare it with FEH or Jpegview

comment:6 by simon04, 4 years ago

Image loading has changed via r17548 (from Toolkit.getDefaultToolkit().createImage(...) to ImageIO.read(...)). Can you narrow down the regression to a specific commit?

in reply to:  6 comment:7 by StephaneP, 4 years ago

Replying to simon04:

Image loading has changed via r17548 (from Toolkit.getDefaultToolkit().createImage(...) to ImageIO.read(...)). Can you narrow down the regression to a specific commit?

I don't have the Java skills to do this. But:
r17544 -> smooth, no crash
r17548 -> scrolling the images is slow, memory usage raise up to 8G, but i failed to crash Josm
r17678 -> same as previous
r17686 -> same as previous
r17698 -> same as previous
r17699 -> same as previous
r17701 -> same as previous, OOM (sometime). I'm not sure memory usage is really different than r17548
r17779 -> same as previous, OOM (sometime). I'm not sure memory usage is really different than r17548
r17788 -> scrolling is very very slow, OOM in less than one minute.

Last edited 4 years ago by StephaneP (previous) (diff)

comment:8 by StephaneP, 4 years ago

Hi!

I just tested r17878.
Scrolling thru the images is smooth like r17544, perhaps even smoother. Thanks for that!

But a problem remains: If I scroll thru 500 images (around 2MB each) I have to wait for about 2mn20s to see the last image.

comment:9 by StephaneP, 3 years ago

If I "scroll" thru a lot of images, and remove the image layer, Josm still try to load all the images. In the meantime, I can't download osm data and can't do a lot of other things.

In the attached video (image_layer.mp4), I've removed the image layer 10 minutes ago.

Last edited 3 years ago by StephaneP (previous) (diff)

by StephaneP, 3 years ago

Attachment: image_layer.mp4 added

comment:10 by Don-vip, 3 years ago

Resolution: fixed
Status: newclosed

In 18150/josm:

fix #20799 - fix performance/memory issues while scrolling across many geolocated images

comment:11 by Don-vip, 3 years ago

Milestone: 21.08

comment:12 by StephaneP, 3 years ago

I confirm it's ok now! Thanks!!

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.