Repository navigation
Conversation
|
@karussell the changes proposed here should be less intrusive than those in #2327 |
|
Although we do some caching already in EdgeIteratorState ( The least invasive change could be probably to cache the PointList in the EdgeIteratorState somehow or store the bbox like proposed in #2320 (comment). But even if this would be possible I (currently!) do not see the need to have this cached. E.g. we currently should focus on making longer route requests much faster with simple custom models (avoid motorway, ferry, ...) instead of making routing a bit faster for specific use cases (many |
Good catch. Currently the reset happens here: Edit: doesn't setWayGeometry only touch pillar nodes? That shouldn't change the bbox for tower nodes
Gave this one a little bit of thought but we need the full way geometry pretty late as the bbox check is sufficient for most examined edges.
Depends on which kind of bbox we're talking about. The bbox for the complete way geometry is a lot more taxing. The one of the tower nodes is rather cheap but we still suffer from having to create
The caching is already notable for a single area as we create and modify a single BBox instead of a BBox per edge. |
|
@karussell i gave it a bit of thought lately and we could skip all of the boolean intersectsTowerBBox(BBox bbox); |
|
@karussell this version should be a lot less invasive and keeps the cached BBox within the iterator. |
| return true; | ||
| } | ||
|
|
||
| return shape.intersects(fetchWayGeometry(FetchMode.ALL).makeImmutable()); |
There was a problem hiding this comment.
We could also cache the way geometry here and drop it when goToNext() or setWayGeometry() is called.
|
@karussell any chance to get this merged? |
|
My opinion in this matter is still unchanged:
I know this is unsatisfying but I would currently not like to optimize it. And when we optimize we really need some numbers with serious improvements (to justify the caching ugliness) and then I would probably even go further and store the pointlist bbox in the wayGeometry somehow like @easbar suggested in the other issue. |
Ultimately, this is the cleanest approach. |
EdgeIteratorImpl.goToNext()to avoid recreating it for every visited edge