aarondandy / WeCantSpell.Hunspell

A port of Hunspell v1 for .NET and .NET Standard
https://www.nuget.org/packages/WeCantSpell.Hunspell/
Other
126 stars 19 forks source link

Implements what is hopefully a safer time limit check #83

Closed aarondandy closed 1 year ago

aarondandy commented 1 year ago

I don't know the root cause of the issue mentioned in https://github.com/aarondandy/WeCantSpell.Hunspell/issues/78 but I have a hunch this might be related. I'm hopeful that moving away from Environment.TickCount will at least make the code a bit more resilient. This change comes with some reduced performance when checking incorrect words, but I think it is worth the cost. Based on what I have read, Environment.TickCount isn't very reliable, especially after 25 days . I hope DateTime.Utc.Ticks can be more reliable.