-
Notifications
You must be signed in to change notification settings - Fork 64
Description
At the moment the Database is quite a complex data structure.
I would like to make a single static database, but I'm not sure if that fit's with the design goals of the library.
So in an effort to clarify what the design goals of the library are, I have some questions:
-
Is there a concrete use case for loading a database that's not the default?
Thefn parse_withaccepts adatabaseparam, is that used by the community?- If there is no concrete case, then maybe the
Databasecan become a static structure represented as Rust source code
generated from theassets/PhoneNumberMetadata.xml?
- If there is no concrete case, then maybe the
-
The bincode (
Vec<Meatadata>) is processed on first use (throughlazy_staticat time of writing) into aDatabasewhich is a composite of aRegexCacheand threeHashMaps.
This cache and HashMap generation has quite the runtime cost. It looks like it can be created offline and then stored as bincode. Then it's simply a matter of loading the database at runtime.