Skip to content

Output log for unused altRouteNames #230

Closed

Description

@michihdeu

We already have unusedaltlabels.log but an unusedaltroutenames.log would help to eliminate leftover.

Activity

  1. yakra commented on Dec 21, 2019

    @yakra
    Contributor

    First create an unused_alt_route_names set for each Route, much like the existing unused_alt_labels. Populate it during Route construction, when the alt_route_names list is created. Then, either:

    • During .list processing, every time a Region+Name combo is matched, remove it from the unused_alt_route_names set. For primary names, we're just removing something that's already not there. :) This is the simpler-to-code option.
    • Create two route_hash tables, one for primary names and one for AltRouteNames. When a lookup in the primary table fails, check the alt table. When an AltRouteName match is found, remove it from the set.
      • Faster where, for the 99.82% of good .list lines not using AltRouteNames, we're not searching for a nonexistent primary name in the unused_alt_route_names set.
      • A tiny bit slower in the 0.18% of cases where AltRouteNames are involved, because we're looking up these entries in two hash tables instead of one, and in Unknown region/highway combo cases (which number 3.6x as many).
        Counterbalanced to whatever degree by the primary name lookups being a tiny bit faster due to using a smaller set.
      • For another potential speedup, this enables us to remove the existing alt_route_names list (which would also save some RAM).
        • Right now, every time we find a region/highway match, we iterate through the alt_route_names list until a match is found, to add the deprecated route name ... -> canonical name note to the user log.
        • No iterating; instead, just add the note to the log as soon as a match is found via the alt_route_hash table.
  2. yakra commented on Apr 7, 2020

    @yakra
    Contributor

    I think it would be useful to have lists of both unused and in-use AltRouteNames.

  3. self-assigned this
    on May 7, 2020
  4. yakra commented on May 17, 2020

    @yakra
    Contributor

    I think it would be useful to have lists of both unused and in-use AltRouteNames.

    In-use AltRouteNames is a bit questionable. More useful would be a .log of all in-use .list names, whether primary or alternate.

  5. yakra commented on May 19, 2020

    @yakra
    Contributor

    Similar to "option 2" for waypoint labels, .list names will be flagged as in-use:

    • only if the entire.list line, both waypoint labels included, is valid and credits a traveler with non-zero distance traveled.
    • a valid region/route combo alone is not sufficient.
  6. added a commit that references this issue on May 20, 2020
    11d0ca7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions