Open Floppy opened 1 week ago
Not yet but it a great idea. Some work have been made recently on #12 to substantially reduce these numbers. It could also help with PR #9 which is been asking to allow for configurable dictionaries.
This gem was aimed to be a drop-in replacement for other implementations, at least as much as possible.
There is a class Zxcvbn::Tester
declared at lib/zxcvbn.rb:43
which hold the data while it exists in other ports.
That is the key for implementing: lazy data loading, make it possible to free the used memory and also allow for loading alternative dictionaries without causing trouble.
Would there be (or is there already?) any way to lazy-load the matches and frequency lists, so that memory is only used when password strengths are actually checked?
derailed
shows the following retained memory stats:As you can see, xzcvbn is the largest by far. Lazy loading would save 12MB of memory per process, which would benefit everyone! Obviously if the tables are in regular use, then keeping them loaded is the best way, but for a site with only occasional need for the strength check, there's a potential saving to be had.