Skip to content
  • Ondřej Surý's avatar
    Use hashmap when parsing a message · b8a96317
    Ondřej Surý authored and Michał Kępień's avatar Michał Kępień committed
    When parsing messages use a hashmap instead of a linear search to reduce
    the amount of work done in findname when there's more than one name in
    the section.
    
    There are two hashmaps:
    
    1) hashmap for owner names - that's constructed for each section when we
    hit the second name in the section and destroyed right after parsing
    that section;
    
    2) per-name hashmap - for each name in the section, we construct a new
    hashmap for that name if there are more than one rdataset for that
    particular name.
    b8a96317