Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3693 closed defect (fixed)

Preferences dialog take very long to show up

Reported by: bilbo Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

Preferences dialog needs several seconds to show. I investigated the issue and I've found one of the causes: every invocation of the dialog, JOSM tries to find installed locales. However it does this by calling org.openstreetmap.josm.tools.I18n.getAvailableTranslations(), which in turn enumerates all locales installed on system, then checking for each if that translation is present in the .jar. This have two disadvantages:

  • Some translation can be omitted, if that locale is not installed on system
  • On systems, where there are many installed locales, this search takes quite a long time (for most locales on my system there is no corresponding JOSM translation)

Since locales are embedded in the .jar, this can be solved by creating list of available locales, perhaps with some extra information (name of the language) added at compile time, so this function will just quickly return pre-made list.

Attachments (0)

Change History (4)

comment:1 by Gubaer, 15 years ago

Ticket #3981 has been marked as a duplicate of this ticket.

comment:2 by Gubaer, 15 years ago

Resolution: fixed
Status: newclosed

(In [2535]) fixed #3693: Preferences dialog take very long to show up
loading of available translations now deferred. List is loaded asynchronously when it is actually needed

comment:3 by stoecker, 15 years ago

You broke code ATM:

LanguagePreference.java:123:

getAvailableTranslations() in org.openstreetmap.josm.tools.I18n cannot be applied to (org.openstreetmap.josm.gui.progress.ProgressMonitor)

Arrays.asList(I18n.getAvailableTranslations(getProgressMonitor()))

comment:4 by Gubaer, 15 years ago

(In [2536]) fixed #3693: Preferences dialog take very long to show up
forgot to check in in r2535

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.