Skip to content

Commit

Permalink
use serde_json_borrow instead of serde_json::Value
Browse files Browse the repository at this point in the history
  • Loading branch information
PSeitz committed May 27, 2024
1 parent 9ad451e commit 6c7c731
Show file tree
Hide file tree
Showing 12 changed files with 326 additions and 163 deletions.
48 changes: 43 additions & 5 deletions quickwit/Cargo.lock

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

5 changes: 3 additions & 2 deletions 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 = { path = "../../../tantivy/compact_doc", 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,5 +347,5 @@ sasl2-sys = { git = "https://github.com/quickwit-oss/rust-sasl/", rev = "daca921
debug = false

[profile.release]
debug = true
#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

0 comments on commit 6c7c731

Please sign in to comment.