Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use serde_json_borrow to parse JSON #5035

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 32 additions & 11 deletions quickwit/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion quickwit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ sea-query-binder = { version = "0.5", features = [
# ^1.0.184 due to serde-rs/serde#2538
serde = { version = "1.0.184", features = ["derive", "rc"] }
serde_json = "1.0"
serde_json_borrow = { version = "0.5" }
serde_qs = { version = "0.12", features = ["warp"] }
serde_with = "3.8.0"
serde_yaml = "0.9"
Expand Down Expand Up @@ -318,7 +319,7 @@ quickwit-serve = { path = "quickwit-serve" }
quickwit-storage = { path = "quickwit-storage" }
quickwit-telemetry = { path = "quickwit-telemetry" }

tantivy = { git = "https://github.com/quickwit-oss/tantivy/", rev = "5b7cca1", default-features = false, features = [
tantivy = { git = "https://github.com/quickwit-oss/tantivy/", rev = "2e3641c", default-features = false, features = [
"lz4-compression",
"mmap",
"quickwit",
Expand Down Expand Up @@ -346,4 +347,5 @@ sasl2-sys = { git = "https://github.com/quickwit-oss/rust-sasl/", rev = "daca921
debug = false

[profile.release]
#debug = true
lto = "thin"
2 changes: 2 additions & 0 deletions quickwit/quickwit-doc-mapper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ once_cell = { workspace = true }
regex = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_json_borrow = { workspace = true }
siphasher = { workspace = true }
time = { workspace = true }
tantivy = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

use criterion::{criterion_group, criterion_main, Criterion, Throughput};
use quickwit_doc_mapper::{DocMapper, RoutingExpr};
use serde_json::Value as JsonValue;

const JSON_TEST_DATA: &str = include_str!("data/simple-routing-expression-bench.json");

Expand Down Expand Up @@ -48,7 +47,7 @@ pub fn simple_routing_expression_benchmark(c: &mut Criterion) {
let doc_mapper: Box<dyn DocMapper> = serde_json::from_str(DOC_MAPPER_CONF).unwrap();
let lines: Vec<&str> = JSON_TEST_DATA.lines().map(|line| line.trim()).collect();

let json_lines: Vec<serde_json::Map<String, JsonValue>> = lines
let json_lines: Vec<serde_json_borrow::Value> = lines
.iter()
.map(|line| serde_json::from_str(line).unwrap())
.collect();
Expand Down
Loading
Loading