Modify

Opened 3 months ago

Closed 2 months ago

#18864 closed enhancement (fixed)

TaggingPreset: refactor/simplify/improve

Reported by: simon04 Owned by: simon04
Priority: normal Milestone: 20.03
Component: Core Version:
Keywords: yourkit performance presets Cc:

Description


Attachments (0)

Change History (23)

comment:1 Changed 3 months ago by simon04

In 16040/josm:

see #18864 - ComboMultiSelect: remove/inline zipIcons field

Reduces retained size of TaggingPreset from 1_841_336 to 1_630_536

comment:2 Changed 3 months ago by simon04

In 16041/josm:

see #18864 - TaggingPreset: use ArrayList with default capacity of 2

Reduces retained size of TaggingPreset from 1_893_976 to 1_758_840 (de).

comment:3 Changed 3 months ago by simon04

In 16042/josm:

see #18864 - TaggingPreset: use short type for numeric field

Reduces retained size of TaggingPreset from 1_758_840 to 1_750_272 (de).

comment:4 Changed 3 months ago by simon04

In 16043/josm:

see #18864 - TaggingPreset: use char for separator field

Retained size of TaggingPreset is unchanged at 1_750_272 (de).

comment:5 Changed 3 months ago by simon04

In 16044/josm:

see #18864 - I18n.format: use not format when there are no objects

Reduces retained size of TaggingPreset from 1_750_272 to 1_667_448 (de).

comment:6 Changed 3 months ago by simon04

In 16045/josm:

see #18864 - TaggingPreset: use byte for use_last_as_default field, use boolean for values_searchable field

Reduces retained size of TaggingPreset from 1_667_448 to 1_663_120 (de).

comment:7 Changed 3 months ago by simon04

In 16046/josm:

see #18864 - ComboMultiSelect.Renderer: use short for preferred width/height fields

Reduces retained size of TaggingPreset from 1_663_120 to 1_633_408 (de).

comment:8 in reply to:  5 ; Changed 3 months ago by simon04

Replying to simon04:

In 16044/josm:

see #18864 - I18n.format: use not format when there are no objects

Reduces retained size of TaggingPreset from 1_750_272 to 1_667_448 (de).

This broke two unit tests expecting that ´´ is turned into ´:

  • org.openstreetmap.josm.gui.dialogs.relation.actions.RelationEditorActionsTest.testDeleteCurrentRelationAction
  • org.openstreetmap.josm.tools.I18nTest.testEscape

Will investigate later today.

comment:9 in reply to:  8 Changed 3 months ago by Klumbumbus

Replying to simon04:

This broke two unit tests expecting that ´´ is turned into ´:

Maybe it is also the reason for the new warning * Description differs ('Archeological and architectural monuments/sites and cultural environments protected by law ('enkeltminner') from the Norwegian Directorate for Cultural Heritage' != 'Archeological and architectural monuments/sites and cultural environments protected by law (''enkeltminner'') from the Norwegian Directorate for Cultural Heritage'): [NO] Riksantikvaren Heritage Sites overlay [riksantikvaren-kulturminner] at ImageryCompare

One plugin is incompatible too https://josm.openstreetmap.de/jenkins/job/JOSM-Integration/4364/warnings3Result/

comment:11 Changed 3 months ago by simon04

In 16049/josm:

see #18864 - I18n.format: fix strings containing apostrophe U+0027

comment:12 Changed 3 months ago by simon04

In 16057/josm:

see #18864 - ComboMultiSelect: use array-based set for storing PresetListEntry

Reduces retained size of TaggingPreset from 1_633_288 to 1_468_680 (de).

comment:13 Changed 3 months ago by simon04

In 16058/josm:

see #18864 - ComboMultiSelect: unset values field after initialization

Reduces retained size of TaggingPreset from 1_468_680 to 1_427_024 (de).

comment:14 Changed 3 months ago by simon04

Keywords: performance added

comment:16 Changed 3 months ago by Don-vip

Keywords: presets added

comment:17 Changed 2 months ago by skyper

See #18954 for a regression.

comment:18 Changed 2 months ago by simon04

In 16180/josm:

fix #18954, see #18864 - TaggingPresetReader: read short types

comment:19 Changed 2 months ago by simon04

In 16181/josm:

see #18954, see #18864 - Introduce StringParser for parsing various types

comment:20 Changed 2 months ago by simon04

In 16184/josm:

see #18954, see #18864 - Introduce GenericParser for Cascade.convertTo

comment:21 Changed 2 months ago by Don-vip

There's a bunch of SonarQube issues to fix: https://josm.openstreetmap.de/sonar/project/issues?id=josm&resolved=false&sinceLeakPeriod=true&types=CODE_SMELL

Be careful with this one:

  • "Replace this "Map.get()" and condition with a call to "Map.computeIfAbsent()".

Currently, we cannot do it, as the computation is recursive, it makes JOSM hang if we change it. Not sure if it can be addressed by refactoring the code.

comment:22 Changed 2 months ago by simon04

In 16188/josm:

see #18954, see #18864 - fix SonarQube issues

comment:23 Changed 2 months ago by simon04

Resolution: fixed
Status: assignedclosed

Modify Ticket

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