Modify

Opened 5 years ago

Closed 5 years 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 by simon04, 5 years ago

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 by simon04, 5 years ago

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 by simon04, 5 years ago

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 by simon04, 5 years ago

In 16043/josm:

see #18864 - TaggingPreset: use char for separator field

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

comment:5 by simon04, 5 years ago

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 by simon04, 5 years ago

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 by simon04, 5 years ago

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).

in reply to:  5 ; comment:8 by simon04, 5 years ago

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.

in reply to:  8 comment:9 by Klumbumbus, 5 years ago

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 by simon04, 5 years ago

In 16049/josm:

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

comment:12 by simon04, 5 years ago

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 by simon04, 5 years ago

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 by simon04, 5 years ago

Keywords: performance added

comment:16 by Don-vip, 5 years ago

Keywords: presets added

comment:17 by skyper, 5 years ago

See #18954 for a regression.

comment:18 by simon04, 5 years ago

In 16180/josm:

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

comment:19 by simon04, 5 years ago

In 16181/josm:

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

comment:20 by simon04, 5 years ago

In 16184/josm:

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

comment:21 by Don-vip, 5 years ago

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 by simon04, 5 years ago

In 16188/josm:

see #18954, see #18864 - fix SonarQube issues

comment:23 by simon04, 5 years ago

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. 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.