Skip to content

CH preparation becomes very slow when there are large-weight edges #2375

Closed

Description

@easbar

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.

See also comment here: #2353 (comment)

Activity

  1. 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
  2. easbar commented on Dec 8, 2021

    @easbar
    MemberAuthor

    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:

    before #2390 after #2390 after #2491
    without country rules 60s 52s 40s
    with country rules 178s 63s 48s

    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.

  3. otbutz commented on Dec 9, 2021

    @otbutz
    Contributor

    Looking forward to the country rules being enabled by default 😃

  4. easbar commented on Dec 11, 2021

    @easbar
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions