-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break down the match statement to smaller functions using one function for each TLD. This reduces compile times, which had shot up from about 30mins in the previous release to about 1hr, down to about 3mins!
- Loading branch information
Showing
8 changed files
with
123 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,11 +12,6 @@ readme = "README.md" | |
keywords = ["tld", "gtld", "cctld", "domain", "psl"] | ||
authors = ["rushmorem <[email protected]>"] | ||
|
||
[features] | ||
default = ["list", "punycode"] | ||
list = ["psl/list"] | ||
punycode = ["psl/punycode"] | ||
|
||
[dependencies] | ||
rental = "0.5" | ||
error-chain = "0.12" | ||
|
@@ -25,13 +20,13 @@ lazy_static = "1.0" | |
idna = "0.1" | ||
|
||
[dependencies.psl] | ||
version = "0.3" | ||
default-features = false | ||
version = "0.4" | ||
path = "./psl" | ||
|
||
[dev-dependencies] | ||
rspec = "=1.0.0-beta.4" | ||
criterion = "0.2" | ||
|
||
[package.metadata.docs.rs] | ||
rustc-args = ["--cfg", "addr_docs_rs"] | ||
rustdoc-args = ["--cfg", "addr_docs_rs"] | ||
[[bench]] | ||
name = "list_benchmark" | ||
harness = false |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
name = "psl-codegen" | ||
description = "Generate native Rust code from Mozilla's Public Suffix List" | ||
version = "0.3.3" | ||
version = "0.4.0" | ||
license = "MIT/Apache-2.0" | ||
repository = "https://github.com/addr-rs/addr/tree/master/codegen" | ||
documentation = "https://docs.rs/psl-codegen" | ||
|
@@ -13,18 +13,12 @@ authors = ["rushmorem <[email protected]>"] | |
proc-macro = true | ||
|
||
[features] | ||
default = ["prefix", "punycode"] | ||
default = ["prefix"] | ||
|
||
# Whether or not to prefix the generated types | ||
# from the `psl` crate with the name of the crate | ||
prefix = [] | ||
|
||
# Add compile time punycode support | ||
# If you don't need punycode support, disable this | ||
# to reduce compile times by almost half for the | ||
# official list. | ||
punycode = [] | ||
|
||
[dependencies] | ||
proc-macro2 = "0.4" | ||
quote = "0.6" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
name = "psl" | ||
description = "A native library for Mozilla's Public Suffix List" | ||
version = "0.3.6" | ||
version = "0.4.0" | ||
license = "MIT/Apache-2.0" | ||
repository = "https://github.com/addr-rs/addr/tree/master/psl" | ||
documentation = "https://docs.rs/psl" | ||
|
@@ -10,35 +10,23 @@ keywords = ["tld", "gtld", "cctld", "domain", "psl"] | |
authors = ["rushmorem <[email protected]>"] | ||
|
||
[features] | ||
default = ["list", "punycode"] | ||
default = ["list"] | ||
list = ["psl-codegen", "serde"] | ||
punycode = ["list", "psl-codegen/punycode"] | ||
dynamic = [ ] | ||
|
||
[dependencies.serde] | ||
version = "1.0" | ||
default-features = false | ||
optional = true | ||
|
||
[dependencies.psl-codegen] | ||
version = "0.3" | ||
version = "0.4" | ||
default-features = false | ||
path = "../codegen" | ||
optional = true | ||
|
||
[dev-dependencies] | ||
psl-lexer = { version = "0.2", path = "../lexer" } | ||
rspec = "=1.0.0-beta.4" | ||
idna = "0.1" | ||
criterion = "0.2" | ||
|
||
[build-dependencies] | ||
rustc_version = "0.2" | ||
|
||
[package.metadata.docs.rs] | ||
rustc-args = ["--cfg", "psl_docs_rs"] | ||
rustdoc-args = ["--cfg", "psl_docs_rs"] | ||
|
||
[[bench]] | ||
name = "list_benchmark" | ||
harness = false |
Oops, something went wrong.