Update to zero-copy* HTML parsing

html5ever now uses the Tendril string type to minimize copying internally,
but Servo still converts from/to `String` at the boundary
(which involves copying).
This commit is contained in:
Simon Sapin 2015-06-25 20:40:38 -07:00
parent ea06bebca9
commit 34bfa16517
7 changed files with 81 additions and 16 deletions

24
ports/cef/Cargo.lock generated
View file

@ -387,6 +387,14 @@ name = "freetype-sys"
version = "2.4.11"
source = "git+https://github.com/servo/libfreetype2#3f22b9dd3be53cdea2a46a0d8eadf72eaeafe2b3"
[[package]]
name = "futf"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gcc"
version = "0.3.8"
@ -539,7 +547,7 @@ dependencies = [
[[package]]
name = "html5ever"
version = "0.1.1"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"html5ever_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -549,6 +557,7 @@ dependencies = [
"phf_macros 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1035,7 +1044,7 @@ dependencies = [
"euclid 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1",
"html5ever 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"js 0.1.0 (git+https://github.com/servo/rust-mozjs)",
"libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1054,6 +1063,7 @@ dependencies = [
"string_cache 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"tendril 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1218,6 +1228,16 @@ name = "tenacious"
version = "0.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "tendril"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"futf 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "time"
version = "0.1.26"

24
ports/gonk/Cargo.lock generated
View file

@ -374,6 +374,14 @@ name = "freetype-sys"
version = "2.4.11"
source = "git+https://github.com/servo/libfreetype2#3f22b9dd3be53cdea2a46a0d8eadf72eaeafe2b3"
[[package]]
name = "futf"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gcc"
version = "0.3.8"
@ -473,7 +481,7 @@ dependencies = [
[[package]]
name = "html5ever"
version = "0.1.1"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"html5ever_macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -483,6 +491,7 @@ dependencies = [
"phf_macros 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -943,7 +952,7 @@ dependencies = [
"euclid 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1",
"html5ever 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"js 0.1.0 (git+https://github.com/servo/rust-mozjs)",
"libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
@ -962,6 +971,7 @@ dependencies = [
"string_cache 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"tendril 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1116,6 +1126,16 @@ name = "tenacious"
version = "0.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "tendril"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"futf 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "time"
version = "0.1.26"