Is there any way to have the Name Suggestion Index in JOSM?
Thank you, I didnāt see it.
I tried enable itā¦ seems to lock-up the presets drop down menu for me once enabled
I saw that too, and I think thatās because the NSI is pretty big now.
Yep. When I took stack dumps, it looked like it was still building the menu.
TBH, I donāt think we should be be building menu items for NSI, but we currently need to. I had a patch set awhile back where I was experimenting with detecting NSI-like presets (AKA no user input) and using those as prefill options in the parent preset tagging window.
Appearing in search is fine, but it really adds a lot to the preset menu.
I just did a bit of profiling. I donāt know what either one of you is running, but on Mac it appears to freeze for ~20 minutes, and most of that time is in Mac OS X native code. I was able to cut the time a bit by turning off preset menu sorting, but that still took ~10 minutes.
On Linux (a Raspberry Pi 4 to be exact), no freeze occurs.
If both of you are on Mac, I suspect it is due to the default Mac Look and Feel. See Help/Preferences/Display for details on how to change it. Just change it off of Mac OS X
.
I use Windows 11; the freeze was about 2 seconds long. Not very annoying, but visible.
OK. That isnāt horrible (NSI + JOSM defaults is 21923 presets, of which 20882 are from NSI).
During testing, when I removed 20% of the presets, the time (with the Mac OS X
Look and Feel) went from 20 minutes to 2 minutes. So we are looking at O(n^2) or worse with the Mac OS X
Look and Feel. Iām pretty certain that it is coming from adding each preset to the menu.
Anyway, Iāve filed an upstream Java bug report with a test case.
Iāve filed an upstream Java bug report with a test case.
Any chance you can link to the JOSM issue so I can follow it?
Iām waiting for the Java bug tracker to give me an actual ticket, but it should appear under Issue Navigator - Java Bug System . If not, Iāll try to update this post with a link.
The bug is at [JDK-8297117] Adding 22k JMenuItems to a JMenu tree terminating in a JMenuBar freezes the UI - Java Bug System .
I have no clue if/when it will ever be fixed (it is a P4).
I donāt really think converting the NSI directly to presets is a sensible thing to do to start with, it is just a way to get around the lack of native support in JOSM.
In Vespucci we use the NSI as one of the three data sets that are searched when you enter a string in the preset search field. Potential matches of the search strings in the NSI are then converted on the fly to appropriate preset items for selection (the tags from the NSI are set to the best matching preset).
Resurrecting this thread, @Nadjita pointed me to the NSI preset and loaded it up, played a bit and indeed it finds e.g. the local bank names with matching wikidata tag and few more basal tags, BUT, then noticed a very substantial mapping speed reduction drawing lines which is what I do 95-98 percent of the time on OSM. When I remove this preset in prefs I get the performance back immediately. Not sure why it slows down the line drawing but itās doing that big time, same for tracing (Follow function), 1 node a second almost. Is this temporary while itās doing indexing the countless additions to the preset table maybe?
ciao
edit: Ticket link as created per below request: #23018 (The Name Suggestion Index preset causes dramatic slowing in line drawing and following (tracing)) ā JOSM
Please open a ticket on JOSM Trac with details. You should do that by going to Help
ā Report bug
in JOSM. It will prefill details, like what version of JOSM you are actually using, what plugins you have installed, and so on.
Opened a ticket 23018 per your request, link insert in my previous post here. Today I felt like being intoxicated or similar when mapping with an active data layer of just under 1km*1km, which saved as just over 2MB, the mouse moving in slow motion and realizing Iād forgotten to detach the NSI plugin and sure enough binned and all is fine again. Fetching the plugin and detaching it is tedious to say the leastā¦ Iād like to map a bus stop when Iām there with the post in view and not come back later, having to find it and complete the tagging. Attach, type name of operator, get the wiki network/operator tags, detach the āideaā developed: What if this would work the same way as the style screen:
This is the Tagging Presets selection screen
This is the Mapping Styles selection screen
I donā't need particular styles constantly, nor do I need Preset
This is the Plugin Install / Selection screen
So I wonder, would it be in the realm of possibilities to add tick boxes to the Tagging Presets selection screen, untick to put them to sleep as it were, but ready to be reactivated without having to scroll/search and reattach? Not binning would be so much better.
TYSM
Thank you for opening that ticket. Iāll respond to anything relevant to that ticket in the ticket.
would it be in the realm of possibilities to add tick boxes to the Tagging Presets selection screen
Technically, yes. There would be some backward incompatibilities though ā I think we currently just have a list of enabled presets. In order to fix this, we would have to either have two lists (a ādownloadedā and an āenabledā list) or a map of downloaded presets ā enabled state.
@vorpalblade-kaart Today the surprise update to JOSM 18822 was pulled by Openwebstart, not expecting it until Sep 2-3. Immediately added back the NSI tagging preset in hopes the beginning August fix v.v. ticket 23018 was included and went to work in a relation rich area. The tracing is substantially faster and drawing new lines seems to run with new vigor, but maybe Iām tired and itās just perception )))