Open francocipollone opened 2 years ago
This check is actually within the scope of the tolerance selection mechanism. I hadn't realized this because of this reassign that goes against dependency injection.
Pushing this verification from the parser to the building will improve time given that just for that check we are rebuilding the DBmanager(therefore parsing the XML) for each iteration.
Summary
When the tolerance selection mechanism is working the RoadGeometryBuilder reset the linear tolerance and try to build the RoadGeometry again.
However, ~there is one check that is falling outside of that reassign of linear tolerances and it happens at a parser level~.(EDITED: See https://github.com/ToyotaResearchInstitute/maliput_malidrive/issues/183#issuecomment-945841189)
https://github.com/ToyotaResearchInstitute/maliput_malidrive/blob/f93c0e4ec4be5d229760cdfda5cb3c4c1255db4d/maliput_malidrive/src/maliput_malidrive/xodr/parser.cc#L774-L778
Given that the
DBManager
is injected into theRoadGeometryBuilder
and the parsing is only made once.https://github.com/ToyotaResearchInstitute/maliput_malidrive/blob/f93c0e4ec4be5d229760cdfda5cb3c4c1255db4d/maliput_malidrive/src/maliput_malidrive/builder/road_network_builder.cc#L52-L55
Proposal
This verification should be pushed into the RoadGeometryBuilder instead.