Changes between Initial Version and Version 1 of Ticket #20716, comment 68


Ignore:
Timestamp:
2022-06-07T00:16:12+02:00 (4 years ago)
Author:
taylor.smock

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20716, comment 68

    initial v1  
    33Most of the CPU cost is in `Way#isUsable` (73% of method). I want to say I saw something somewhere about caching the result from that call. Which would help immensely. It is also responsible for ~17% of the memory allocations. Mostly from the stream in `Way#hasIncompleteNodes`.
    44
    5 About 25% of the allocations are from `INode#getEastNorth` -- the actual `EastNorth` object is not cached in `Node`. It looks those are for `Geometry.getSegmentSegmentIntersection`, which we may want to add an overload for (`Geometry.getSegmentSegmentIntersection(ILatLon, ILatLon, ILatLon, ILatLon)`). I'll attach a patch for that, if you want to try it. If it works out, a bit of cleanup will be necessary for sonarlint (`null` -> empty arrays, specifically).
     5About 25% of the allocations are from `INode#getEastNorth` -- the actual `EastNorth` object is not cached in `Node`. It looks those are for `Geometry.getSegmentSegmentIntersection`, which we may want to add an overload for (`Geometry.getSegmentSegmentIntersection(ILatLon, ILatLon, ILatLon, ILatLon)`). I'll attach a [attachment:20716.patch patch] for that, if you want to try it. If it works out, a bit of cleanup will be necessary for sonarlint (`null` -> empty arrays, specifically).
    66
    77