You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CH preparation becomes very slow when there are large-weight edges #2375
For example if we enable GermanyCountryRule many track highways are set to use RoadAccess.Destination which strongly increases the corresponding edge weights. This slows down CH preparation as witness searches explore large parts of the graph.
For Germany I measured a x3 slow down for node- and edge-based CH when enabling country rules.
changed the title [-]CH preparation becomes very slow for large weight edges[/-][+]CH preparation becomes very slow when there are large-weight edges[/+]on Jul 29, 2021
I did not notice it back then, but #2390 already improved the situation quite a bit. I just measured the CH preparation time with and without the German country rule before and after #2390, using the bayern-190101.osm.pbf map:
So #2390 actually improved the CH preparation time by a factor of about three in case the country rule is included. Since #2390 the slow down that is due to the German country rule is less than 20%, while it was around x3 before, according to this little experiment.
However, since #2390 only affects the node-based CH preparation this improvement only exists for node-based CH. For edge-based CH I just repeated the same experiment and found that the preparation takes around 800s without the country rule and around 2040s with the country rule (2.5x as long).
I'm working on a fix on this currently it should reduce the preparation for both node- and edge-based CH.
Update: After #2491 the preparation including the country rule is now faster than it was before without the country rule (see updated table above). The country rule still slows down the preparation by about 20%, but for node-based I consider this issue as solved for now. If we really wanted to improve this further we could try tuning the parameters introduced in #2491 including the country rules, but for now improving edge-based CH is a lot more critical.
Activity
[-]CH preparation becomes very slow for large weight edges[/-][+]CH preparation becomes very slow when there are large-weight edges[/+]easbar commentedon Dec 8, 2021
I did not notice it back then, but #2390 already improved the situation quite a bit. I just measured the CH preparation time with and without the German country rule before and after #2390, using the bayern-190101.osm.pbf map:
So #2390 actually improved the CH preparation time by a factor of about three in case the country rule is included. Since #2390 the slow down that is due to the German country rule is less than 20%, while it was around x3 before, according to this little experiment.
However, since #2390 only affects the node-based CH preparation this improvement only exists for node-based CH. For edge-based CH I just repeated the same experiment and found that the preparation takes around 800s without the country rule and around 2040s with the country rule (2.5x as long).
I'm working on a fix on this currently it should reduce the preparation for both node- and edge-based CH.
otbutz commentedon Dec 9, 2021
Looking forward to the country rules being enabled by default 😃
easbar commentedon Dec 11, 2021
Update: After #2491 the preparation including the country rule is now faster than it was before without the country rule (see updated table above). The country rule still slows down the preparation by about 20%, but for node-based I consider this issue as solved for now. If we really wanted to improve this further we could try tuning the parameters introduced in #2491 including the country rules, but for now improving edge-based CH is a lot more critical.