Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#20745 closed enhancement (fixed)

Reduce heap allocations (while rendering/validating) — at Version 17

Reported by: simon04 Owned by: simon04
Priority: normal Milestone: 21.04
Component: Core Version:
Keywords: profiling heap alloc intellij yourkit Cc:

Description (last modified by simon04)

Follow-up of #20613.

Change History (18)

comment:1 by simon04, 5 years ago

In 17751/josm:

see #20745 - Avoid heap allocations due to ValidatorPrefHelper.PREF_OTHER

MapCSSTagChecker: use cached validator.other property

3.23% in MapCSSTagCheckerPerformanceTest#testCity amount to BooleanProperty

comment:2 by simon04, 5 years ago

In 17752/josm:

see #20745 - Avoid heap allocations due to BBox in IPrimitive.getBBox

Cache and return an immutable bounding box.

37.75% in MapCSSTagCheckerPerformanceTest#testCity amount to BBox::new via IPrimitive.getBBox


Last edited 5 years ago by simon04 (previous) (diff)

comment:3 by simon04, 5 years ago

In 17756/josm:

see #20745 - Avoid heap allocations due to ValidatorPrefHelper.PREF_OTHER (fix NPE)

comment:4 by GerdP, 5 years ago

That fix came right in time. I just wondered why unit tests failed ;)

comment:5 by skyper, 5 years ago

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

by simon04, 5 years ago

Attachment: flamegraph-bbox.png added

comment:6 by taylor.smock, 5 years ago

r17752 broke the MapWithAI plugin (see #20753, fixed in plugin). In retrospect, I probably shouldn't have been modifying the returned BBoxes anyway. So thanks @simon04 for forcing me to do the right thing (tm).

comment:7 by simon04, 5 years ago

In 17773/josm:

see #20745 - Introduce TableHelper.selectedIndices

comment:8 by simon04, 5 years ago

In 17799/josm:

see #20745 - Avoid some heap allocations in MapCSS KeyRegexpCondition.applies

14.32% -> 9.42% in MapCSSTagCheckerPerformanceTest#testCity amount to KeyRegexpCondition.applies

comment:9 by simon04, 5 years ago

In 17800/josm:

see #20745 - Avoid heap allocations via Selector.AbstractSelector#conds

comment:10 by simon04, 5 years ago

In 17801/josm:

see #20745 - Avoid heap allocations in MapCSS MatchingReferrerFinder due to lambda expression

4.66% of MapCSSTagCheckerPerformanceTest#testCity amount to java.lang.invoke.Invokers$Holder.linkToTargetMethod

comment:11 by simon04, 5 years ago

In 17802/josm:

see #20745 - Avoid heap allocations in MapCSS MatchingReferrerFinder due to Environment.withPrimitive

9.7% of MapCSSTagCheckerPerformanceTest#testCity amount to Environment.withPrimitive

comment:12 by simon04, 5 years ago

In 17805/josm:

see #20745 - Avoid heap allocations in StyleCache

comment:13 by simon04, 5 years ago

In 17808/josm:

see #20745 - Avoid heap allocations in MapCSS MatchingReferrerFinder due to Environment.withPrimitive

Fixup r17802.

comment:14 by simon04, 5 years ago

In 17809/josm:

see #20745 - Avoid heap allocations in StyleCache

Fixup r17805.

comment:15 by simon04, 5 years ago

In 17822/josm:

see #20745 - Avoid heap allocations in OsmReader

12.0% of OsmReaderPerformanceTest amount to org.openstreetmap.josm.data.osm.OsmPrimitive.updateTagged

comment:16 by simon04, 5 years ago

In 17823/josm:

see #20745 - Avoid heap allocations in OsmReader

5.13% of OsmReaderPerformanceTest amount to org.openstreetmap.josm.data.osm.SimplePrimitiveId.hashCode

comment:17 by simon04, 5 years ago

Description: modified (diff)
Resolution: fixed
Status: assignedclosed

Enough for this milestone. :)

Note: See TracTickets for help on using tickets.