mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-31 19:05:00 +07:00
Reproduces the algorithmic cost of the historical Markdown::append
(`SharedString::new(s.to_string() + t)` per chunk) against the new
buffered path on a 60 KB / 100 x 600 B fixture matching the streaming
shape observed in downstream consumers.
cargo bench -p markdown --bench append_throughput on a Ryzen 7 7800X3D:
pre_fix_concat/60kb_100x600b ~94 us
post_fix_buffered/60kb_100x600b ~2.4 us
ratio ~38x
The criterion HTML report under target/criterion/markdown_append/ is
the load-bearing artefact for the perf claim.
57 lines
1.3 KiB
TOML
57 lines
1.3 KiB
TOML
[package]
|
|
name = "markdown"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
path = "src/markdown.rs"
|
|
doctest = false
|
|
|
|
[features]
|
|
test-support = [
|
|
"gpui/test-support",
|
|
"util/test-support"
|
|
]
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
base64.workspace = true
|
|
collections.workspace = true
|
|
futures.workspace = true
|
|
gpui.workspace = true
|
|
html5ever.workspace = true
|
|
language.workspace = true
|
|
linkify.workspace = true
|
|
log.workspace = true
|
|
markup5ever_rcdom.workspace = true
|
|
mermaid_render = { path = "../mermaid_render" }
|
|
pulldown-cmark.workspace = true
|
|
settings.workspace = true
|
|
stacksafe.workspace = true
|
|
sum_tree.workspace = true
|
|
theme.workspace = true
|
|
theme_settings.workspace = true
|
|
ui.workspace = true
|
|
util.workspace = true
|
|
|
|
[dev-dependencies]
|
|
assets.workspace = true
|
|
criterion.workspace = true
|
|
env_logger.workspace = true
|
|
fs = {workspace = true, features = ["test-support"]}
|
|
gpui = { workspace = true, features = ["test-support"] }
|
|
gpui_platform.workspace = true
|
|
language = { workspace = true, features = ["test-support"] }
|
|
languages = { workspace = true, features = ["load-grammars"] }
|
|
node_runtime.workspace = true
|
|
settings = { workspace = true, features = ["test-support"] }
|
|
util = { workspace = true, features = ["test-support"] }
|
|
|
|
[[bench]]
|
|
name = "append_throughput"
|
|
harness = false
|