danesparza / domainname-parser

:department_store: .NET domain name parsing library (uses publicsuffix.org)
MIT License
35 stars 19 forks source link

Some performance changes #11

Closed horch004 closed 6 years ago

horch004 commented 6 years ago

Changed the way the TLDRuleList is checked for expiration and availablity.

In the rules list iteration of the DomainName.FindMatchingTLDRule method, the static instance of the TLDRulesCache was referenced directly. This caused the CheckRuleList method to get called for every iteration (because of the get access method). I introduced a new method on the TLDRulesCache to get the rules list which is used in the DomainName.FindMatchingTLDRule to get the list prior to the iteration.

danesparza commented 6 years ago

Thanks again @horch004 ⭐️