Modify

Opened 14 months ago

Closed 13 months ago

Last modified 9 months ago

#20745 closed enhancement (fixed)

Reduce heap allocations (while rendering/validating)

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.

Attachments (1)

flamegraph-bbox.png (184.7 KB) - added by simon04 14 months ago.

Download all attachments as: .zip

Change History (19)

comment:1 Changed 14 months ago by simon04

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 Changed 14 months ago by simon04

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 14 months ago by simon04 (previous) (diff)

comment:3 Changed 14 months ago by simon04

In 17756/josm:

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

comment:4 Changed 14 months ago by GerdP

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

comment:5 Changed 14 months ago by skyper

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

Changed 14 months ago by simon04

Attachment: flamegraph-bbox.png added

comment:6 Changed 14 months ago by taylor.smock

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 Changed 14 months ago by simon04

In 17773/josm:

see #20745 - Introduce TableHelper.selectedIndices

comment:8 Changed 13 months ago by simon04

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 Changed 13 months ago by simon04

In 17800/josm:

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

comment:10 Changed 13 months ago by simon04

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 Changed 13 months ago by simon04

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 Changed 13 months ago by simon04

In 17805/josm:

see #20745 - Avoid heap allocations in StyleCache

comment:13 Changed 13 months ago by simon04

In 17808/josm:

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

Fixup r17802.

comment:14 Changed 13 months ago by simon04

In 17809/josm:

see #20745 - Avoid heap allocations in StyleCache

Fixup r17805.

comment:15 Changed 13 months ago by simon04

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 Changed 13 months ago by simon04

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 Changed 13 months ago by simon04

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

Enough for this milestone. :)

comment:18 in reply to:  1 Changed 9 months ago by Don-vip

Replying to simon04:

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

regression: #21261

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.