Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years 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 3 years ago.

Download all attachments as: .zip

Change History (19)

comment:1 by simon04, 3 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, 3 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 3 years ago by simon04 (previous) (diff)

comment:3 by simon04, 3 years ago

In 17756/josm:

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

comment:4 by GerdP, 3 years ago

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

comment:5 by skyper, 3 years ago

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

by simon04, 3 years ago

Attachment: flamegraph-bbox.png added

comment:6 by taylor.smock, 3 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, 3 years ago

In 17773/josm:

see #20745 - Introduce TableHelper.selectedIndices

comment:8 by simon04, 3 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, 3 years ago

In 17800/josm:

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

comment:10 by simon04, 3 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, 3 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, 3 years ago

In 17805/josm:

see #20745 - Avoid heap allocations in StyleCache

comment:13 by simon04, 3 years ago

In 17808/josm:

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

Fixup r17802.

comment:14 by simon04, 3 years ago

In 17809/josm:

see #20745 - Avoid heap allocations in StyleCache

Fixup r17805.

comment:15 by simon04, 3 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, 3 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, 3 years ago

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

Enough for this milestone. :)

in reply to:  1 comment:18 by Don-vip, 3 years ago

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