Modify

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#22453 closed defect (fixed)

[PATCH] Decrease allocations/CPU samples in Geometry.getDistanceSegmentSegment

Reported by: taylor.smock Owned by: team
Priority: normal Milestone: 22.12
Component: Core Version:
Keywords: Cc:

Description

Current statistics, using Mesa County, CO as the data ("nwr in 'Mesa County, CO'") with the MapWithAI plugin validations enabled:

  • CPU samples: 54,604 -> 39,146 (-15,458, -28.3%)
  • Memory allocations: 170,983,028,400 -> 4,645,539,624 (-166,337,488,776, -97.3%)
    • All remaining allocations are from creating a new LatLon during interpolation
  • .7% improvement in GC threads (overall, see notes)

Notes:

  • getDistanceWayNode was also modified to avoid EastNorth allocations
  • All remaining allocations come from the creation of new LatLon objects. This may be alleviated when value classes become a thing in Java LTS.
  • Profiling was done from application startup to shutdown

Attachments (1)

22453.patch (9.1 KB ) - added by taylor.smock 2 years ago.

Download all attachments as: .zip

Change History (4)

by taylor.smock, 2 years ago

Attachment: 22453.patch added

comment:1 by taylor.smock, 2 years ago

Resolution: fixed
Status: newclosed

In 18589/josm:

Fix #22453: Decrease allocations/CPU samples in Geometry.getDistanceSegmentSegment

Statistics, using Mesa County, CO as the data ("nwr in 'Mesa County, CO'") with
the MapWithAI plugin validations enabled (validation run):

  • CPU samples: 54,604 -> 39,146 (-15,458, -28.3%)
  • Memory allocations: 170,983,028,400 -> 4,645,539,624 (-166,337,488,776, -97.3%)
    • All remaining allocations are from creating a new LatLon during interpolation.
  • .7% improvement in GC threads (overall, see notes).

Notes:

  • getDistanceWayNode was also modified to avoid EastNorth allocations.
  • All remaining allocations come from the creation of new LatLon objects. This may be alleviated when value classes become a thing in Java LTS, and we start using them.
  • Profiling was done from application startup to shut down.

comment:2 by taylor.smock, 2 years ago

In 18590/josm:

See #22453: Decrease allocations/CPU samples in Geometry.getDistanceSegmentSegment

This mostly reverts r18589, as it changed the distances returned to LatLon space,
which caused tests to fail.

comment:3 by taylor.smock, 2 years ago

Milestone: 22.1122.12

Milestone renamed

Modify Ticket

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