Repository navigation
Conversation
|
Thanks, this looks good. Regarding the deprecation: this would be nice if the actual code amount reduces somehow. We would need to get rid of the FlagEncoder usage of the calling side first i.e. instead of encodingManager.getFlagEncoder("xy").getAccessEnc() we would do encodingManager.getEncodedValue("car.access") or something. Probably we should indeed move this into a separate issue as this is more related to reducing the usage of FlagEncoder. I would still provide the new method for better migration, just remove the deprecation? Furthermore I would remove the acceptsForward&Backwards methods as I cannot find a usage, or do you think this would be too ugly? |
I checked and in many cases this is what changed: - outEdgeExplorer = graph.createEdgeExplorer(DefaultEdgeFilter.outEdges(flagEncoder));
+ outEdgeExplorer = graph.createEdgeExplorer(DefaultEdgeFilter.outEdges(flagEncoder.getAccessEnc()));Typically the
Ok yes any further changes should go in a separate issue, but should we keep the changes (like the ones above) or do you want to revert this ? Either way is fine for me. If we keep the changes why not keep the deprecation ? The method taking a flag encoder is no longer used, but I thought it would be easier to adopt downstream when the method is kept and only deprecated. If we change back to
Ok. |
Yes, exactly. I would either reduce the FlagEncoder usage also on the calling side (new issue) or keep using the old and shorter variant. Still it would be also no problem if you keep it to save time and schedule the changes for later :)
Good question - convinced ;) |
|
Ok I reverted to the old shorter variant and removed the deprecation. |
| private final int mainEdges; | ||
| private final QueryGraph baseGraph; | ||
| private final GraphExtension wrappedExtension; | ||
| // TODO when spreading it on different threads we need multiple independent explorers |
There was a problem hiding this comment.
what about this todo ? should we keep it ? The current caching mechanism is not thread safe, but the edge-explorer creation is not spread on different threads either.
|
The build failed with |
Oh, likely too many tests in parallel (maybe also some misusage). Have increased this limit for now and triggered the build again. |
|
I moved the (now reverted) flagEncoder vs encoded value refactoring code changes to here: #1625 |
QueryGraphcaches edge-explorers based on the identity of theEdgeFilters passed intocreateEdgeExplorerDefaultEdgeFilterusingFlagEncoder(and adds new ones taking only access encoded value instead)PrepEdgeFilterwithDefaultEdgeFilterinPrepareRoutingSubnetworks(it did not really do anything different thanDefaultEdgeFilter#allEdges).Most changed files are due to 3), and not sure about this.
DefaultEdgeFilteris decoupled fromFlagEncoderflagEncoder.getAccessEnc()instead of simplyflagEncoder. Also 3) is a bit unrelated to the actual issue QueryGraph edge-explorer cache does not work for edge-based CH. #1623.WDYT ? I can also revert this.