Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12507 closed defect (fixed)

slow scrolling in "Map Paint Styles" window

Reported by: malenki Owned by: team
Priority: minor Milestone: 16.02
Component: Core Version: latest
Keywords: Cc:

Description

This has been nagging me for quite a while, finally I bother to report it.

The mouse wheel movement which scrolls about 22 "Notes" entries or "Data layers" only scrolls two "Map Paint styles" entries. This feels like scrolling through glue.

Maybe other windows are affected, too, but so far I only found this.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-02-07 00:16:52 +0100 (Sun, 07 Feb 2016)
Build-Date:2016-02-07 02:32:36
Revision:9748
Relative:URL: ^/trunk

Identification: JOSM/1.5 (9748 en) Linux Debian GNU/Linux unstable (sid)
Memory Usage: 1715 MB / 2222 MB (1088 MB allocated, but free)
Java version: 1.8.0_72-internal-b15, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-Dsun.java2d.opengl=false]
Program arguments: [1, 2016-02-05T11:56:00Z.gpx, 2016-02-06T23:08:13Z.gpx, 2016-02-07T03:08:59Z.gpx, 2016-02-07T15:15:09Z.gpx, 2016-02-07T_all.gpx, dscRX0322951.jpg, dscRX0322952.jpg, dscRX0322953.jpg, dscRX0322954.jpg, dscRX0322955.jpg, dscRX0322956.jpg, dscRX0322957.jpg, dscRX0322958.jpg, dscRX0322959.jpg, dscRX0322960.jpg, dscRX0322961.jpg, dscRX0322962.jpg, dscRX0322963.jpg, dscRX0322964.jpg, dscRX0322965.jpg, dscRX0322966.jpg, dscRX0322967.jpg, dscRX0322968.jpg, dscRX0322969.jpg, dscRX0322970.jpg, dscRX0322971.jpg, dscRX0322972.jpg, dscRX0322973.jpg, dscRX0322974.jpg, dscRX0322975.jpg, dscRX0322976.jpg, dscRX0322977.jpg, dscRX0322978.jpg, dscRX0322979.jpg, dscRX0322980.jpg, dscRX0322981.jpg, dscRX0322982.jpg, dscRX0322983.jpg, dscRX0322984.jpg, dscRX0322985.jpg, dscRX0322986.jpg, dscRX0322987.jpg, dscRX0322988.jpg, dscRX0322989.jpg, dscRX0322990.jpg, dscRX0322991.jpg, dscRX0322992.jpg, dscRX0322993.jpg, dscRX0322994.jpg, dscRX0322995.jpg, dscRX0322996.jpg, dscRX0322997.jpg, dscRX0322998.jpg, dscRX0322999.jpg, dscRX0323000.jpg, dscRX0323001.jpg, dscRX0323002.jpg, dscRX0323003.jpg, dscRX0323004.jpg, dscRX0323005.jpg, dscRX0323006.jpg, dscRX0323007.jpg, dscRX0323008.jpg, dscRX0323009.jpg, dscRX0323010.jpg, dscRX0323011.jpg, dscRX0323012.jpg, dscRX0323013.jpg, dscRX0323014.jpg, dscRX0323015.jpg, dscRX0323016.jpg, dscRX0323017.jpg, dscRX0323018.jpg, dscRX0323019.jpg, dscRX0323020.jpg, dscRX0323021.jpg, dscRX0323022.jpg, dscRX0323023.jpg, dscRX0323024.jpg, dscRX0323025.jpg, dscRX0323026.jpg, dscRX0323027.jpg, dscRX0323028.jpg, dscRX0323029.jpg, dscRX0323030.jpg, dscRX0323031.arw, dscRX0323032.jpg, dscRX0323033.jpg, dscRX0323034.jpg, dscRX0323035.jpg, dscRX0323036.jpg, dscRX0323037.jpg, dscRX0323038.jpg, dscRX0323039.jpg, dscRX0323040.jpg, dscRX0323041.jpg, dscRX0323042.jpg, dscRX0323043.jpg, dscRX0323044.jpg, dscRX0323045.jpg, dscRX0323046.jpg, dscRX0323047.jpg, dscRX0323048.jpg, dscRX0323049.jpg, dscRX0323050.jpg, dscRX0323051.jpg, dscRX0323052.jpg, dscRX0323053.jpg, dscRX0323054.jpg, dscRX0323055.jpg, dscRX0323056.jpg, dscRX0323057.jpg, dscRX0323058.jpg, dscRX0323059.jpg, dscRX0323060.jpg, dscRX0323061.jpg, dscRX0323062.jpg, dscRX0323063.jpg, dscRX0323064.jpg, dscRX0323065.jpg, dscRX0323066.jpg, dscRX0323067.jpg, dscRX0323068.jpg, dscRX0323069.jpg, dscRX0323070.jpg, dscRX0323071.jpg, dscRX0323072.jpg, dscRX0323073.jpg, dscRX0323074.jpg, dscRX0323075.jpg, dscRX0323076.jpg, dscRX0323077.jpg, dscRX0323078.jpg, dscRX0323079.jpg, dscRX0323080.jpg, dscRX0323081.jpg, dscRX0323082.jpg, dscRX0323083.jpg, dscRX0323084.jpg, dscRX0323085.jpg, dscRX0323086.jpg, dscRX0323087.jpg, dscRX0323088.jpg, dscRX0323089.jpg, dscRX0323090.jpg, dscRX0323091.jpg, dscRX0323092.jpg, dscRX0323093.jpg, dscRX0323094.jpg, dscRX0323095.jpg, dscRX0323096.jpg, dscRX0323097.jpg, dscRX0323098.jpg, dscRX0323099.jpg, dscRX0323100.jpg, dscRX0323101.jpg, dscRX0323102.jpg, dscRX0323103.jpg, dscRX0323104.jpg, dscRX0323105.jpg, dscRX0323106.jpg, dscRX0323107.jpg, dscRX0323108.jpg, dscRX0323109.jpg, dscRX0323110.jpg, dscRX0323111.jpg, dscRX0323112.jpg, dscRX0323113.jpg, dscRX0323114.jpg, dscRX0323115.jpg, dscRX0323116.jpg, dscRX0323117.jpg, dscRX0323118.jpg, dscRX0323119.jpg, dscRX0323120.jpg, dscRX0323121.jpg, dscRX0323122.jpg, dscRX0323123.jpg, dscRX0323124.jpg, dscRX0323125.jpg, dscRX0323126.jpg, dscRX0323127.jpg, dscRX0323128.jpg, dscRX0323129.jpg, dscRX0323132_small.jpg, dscRX0323133_small.jpg, dscRX0323134_small.jpg, dscRX0323135_small.jpg, dscRX0323136_small.jpg, dscRX0323138.jpg, dscRX0323139.jpg, dscRX0323140.jpg, dscRX0323141.jpg, Wegpunkte_07-FEB-16.gpx]
Dataset consistency test: No problems found

Plugins:
- FastDraw (31895)
- FixAddresses (31772)
- HouseNumberTaggingTool (31772)
- ImportImagePlugin (31772)
- InfoMode (31772)
- Mapillary (32040)
- OpeningHoursEditor (31772)
- PicLayer (31895)
- RoadSigns (31895)
- ShapeTools (1000)
- apache-commons (31895)
- apache-http (31895)
- buildings_tools (31895)
- contourmerge (1014)
- download_along (31772)
- ejml (31895)
- ext_tools (31772)
- geotools (31895)
- gson (31895)
- imagery_offset_db (32046)
- jts (31772)
- log4j (31895)
- mapdust (31772)
- measurement (31895)
- opendata (31937)
- photo_geotagging (31895)
- photoadjust (32016)
- reltoolbox (31895)
- reverter (32005)
- tag2link (31910)
- tageditor (31772)
- terracer (31895)
- todo (29154)
- turnrestrictions (31895)
- undelete (31895)
- utilsplugin2 (32018)
- waydownloader (31772)
- wikipedia (32003)

Last errors/warnings:
- W: java.net.SocketTimeoutException: Read timed out
- E: java.net.SocketTimeoutException: Read timed out
- E: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketTimeoutException: Read timed out
- W: java.net.SocketException: Socket closed
- E: java.net.SocketException: Socket closed

Attachments (2)

PropertiesDialogScrollIncrement.patch (651 bytes ) - added by kolesar 8 years ago.
SetDefaultIncrement.patch (1.7 KB ) - added by kolesar 8 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 by bastiK, 8 years ago

Resolution: fixed
Status: newclosed

In 9760/josm:

fixed #12507 - slow scrolling in "Map Paint Styles" window

comment:2 by bastiK, 8 years ago

Milestone: 16.02

comment:3 by malenki, 8 years ago

Wow, another speedy fix!
Thank you.

comment:4 by Klumbumbus, 8 years ago

There is a similar problem in the preferences window, validator section. (r9764)

comment:5 by malenki, 8 years ago

@Klumbumbus: thanks for bumping, this reminded me I also had another one:

The tags panel is also awful slow when scrolling.

comment:6 by bastiK, 8 years ago

Scrolling works fine for components that implement the Scrollable interface (JTree, JLayer, JList, JTextComponent and JTable).

For all other components (notably JPanel), the default unit increment is always 1 (I.e. if you click the scroll bar buttons it will move 1 pixel.) The number of unit increments for one mouse wheel "tick" is platform dependent, but usually 3. (I.e. it scrolls 3 pixel per mouse wheel "tick".)

This is generally too slow, a better value for the unit increment would be 16. Unfortunately, there seems to be no way to set this value globally.

comment:7 by bastiK, 8 years ago

In 9778/josm:

see #12507 - fix mouse wheel scrolling at some places

comment:8 by kolesar, 8 years ago

Resolution: fixed
Status: closedreopened

Scrolling of properties dialog (= tags panel as @malenki mentioned before) is still extremely slow. One tick with mouse wheel moves about 3 pixels. When an object has several properties or user has a lot of paint styles it is a pain to scroll down to the latest entries. Some other dialogs have good scrolling speed, for example recently fixed map paint styles dialog. Difference is annoying, these need to be unified.

I have found a good looking method GuiHelper.setDefaultIncrement but it has a condition that I don't understand.

    if (sp.getViewport().getView() instanceof Scrollable) {
        throw new IllegalArgumentException();
    }

Documentation says: throws IllegalArgumentException if the component inside of the scroll pane. Why does it refuse to set increment in this case? I tried to call this from PropertiesDialog and it has thrown this exception.

May I remove the quoted lines from code and call this from dialogs where needed? (I tried it and worked but I'm not sure it does not break anything else.)

in reply to:  8 comment:9 by bastiK, 8 years ago

Replying to kolesar:

Scrolling of properties dialog (= tags panel as @malenki mentioned before) is still extremely slow. One tick with mouse wheel moves about 3 pixels. When an object has several properties or user has a lot of paint styles it is a pain to scroll down to the latest entries. Some other dialogs have good scrolling speed, for example recently fixed map paint styles dialog. Difference is annoying, these need to be unified.

I have found a good looking method GuiHelper.setDefaultIncrement

Good you found it, it is from [9778]. ;-)

but it has a condition that I don't understand.

    if (sp.getViewport().getView() instanceof Scrollable) {
        throw new IllegalArgumentException();
    }

Documentation says: throws IllegalArgumentException if the component inside of the scroll pane. Why does it refuse to set increment in this case?

Because it is generally an error to do so. If a Scrollable component does not scroll properly, the implementation of Scrollable is broken and needs to be fixed. The listed Java classes all work fine.

I tried to call this from PropertiesDialog and it has thrown this exception.

It shouldn't, JPanel is not Scrollable.

May I remove the quoted lines from code and call this from dialogs where needed? (I tried it and worked but I'm not sure it does not break anything else.)

Wouldn't break anything, it is just a check to avoid coding errors.

comment:10 by kolesar, 8 years ago

You are right, no exception if called properly. Attached patch for PropertiesDialog.

comment:11 by bastiK, 8 years ago

In 9831/josm:

see #12507 - slow scrolling in properties dialog (patch by kolesar)

comment:12 by bastiK, 8 years ago

TODO:

  • ToggleDialog.createLayout
  • CommandStackDialog
  • ExtendedDialog.setContent
  • HtmlPanel

comment:13 by kolesar, 8 years ago

  • ToggleDialog: throws exception.
  • HtmlPanel: are you sure? I have searched for scroll without results.

I have attached patch for the rest, they work fine.

by kolesar, 8 years ago

Attachment: SetDefaultIncrement.patch added

comment:14 by bastiK, 8 years ago

Resolution: fixed
Status: reopenedclosed

In 9833/josm:

fixed #12507 - slow mouse wheel scrolling (based on patch by kolesar)

comment:15 by malenki, 8 years ago

Scrolling is now really usable in the mentioned parts of JOSM. 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.