How we improved APM Java startup by encoding a prefix trie as a JVM constant
Datadog's Java APM agent filters uninteresting classes by name during JVM startup using ClassNameTrie, a prefix trie encoded entirely in a single string constant and loaded with one ldc instruction. That avoids resource I/O, parsing and object construction inside the constrained premain phase, where the JIT is cold or absent and touching some JDK classes can break the application. Each node packs a branch count, sorted branch characters, 16-bit values whose top bits mark leaf, bud, glob or inline-segment length, and jump offsets, with a separate table for long jumps. In cold-start JMH benchmarks it beat both the old code-based matcher (nearly 5x on Java 8) and a classic radix trie. In a Spring Boot app, name-based filtering cut instrumented startup by 20%, the trie saved another 1%, and a known-types index built on the same structure added 3%.
Related posts
- How we migrated our static analyzer from Java to Rust
Datadog Engineering mediumAdeptDatadog rewrote the Codiga static analyzer from Java to Rust after switching its parser from ANTLR to Tree-sitter, whose Java bindings lacked features like pattern matching. The rewrite ran analysis about 3x faster with roughly 10x less memory, which matters on small CI runners. Shipping a single binary also removed the JVM dependency, so the same analyzer now runs inside the IDE. The team replaced GraalVM with deno-core as a sandboxed JavaScript rule runtime and mapped Java libraries to serde_yaml, reqwest and rayon. Learning Rust and migrating took about a month, helped by parity tests, clippy and rustfmt.
- Boosting the performance of virtual machines with Jump-Start
Meta Engineering easyNoviceJump-Start cuts JIT warm-up overhead in HHVM by having a small slice of the fleet collect profiling data during Facebook's phased rollout. That data is shared with the remaining servers, so they skip the profiling compile-and-run step. Profile data from the ~2% of servers restarted in phase C2 is reused by the servers restarted in phase C3. Deployed across Facebook's data centers, it reduces HHVM warm-up overhead by 54.9% and, because the profiling can be more thorough, also improves steady-state performance by 5.4%.
- Beyond API Compatibility: Building a Tool to Measure the Blast Radius of Library Changes
Netflix TechBlog mediumAdeptNetflix's Quasar indexes symbol definitions and references across its repositories using SCIP, so library producers can see which consumers use the exact API symbols a change removes or modifies. CI builds submit SCIP indexes, which are stored as Parquet in S3 and queried with Athena. On pull requests, Quasar diffs base and head API snapshots and reports affected repositories, dependency-version distributions, sample call sites and evidence quality such as index freshness and truncation. The main lessons are to keep compatibility separate from reach, make the evidence inspectable, and never treat "no observed usages" as safe to remove. Netflix is extending the same context to coding agents via MCP for earlier warnings and assisted migrations.
- How we built a Ruby library that saves 50% in testing time
Datadog Engineering hardMasterDatadog built a Ruby test impact analysis library for its Intelligent Test Runner that maps each test to the source files it executes, so tests unrelated to a commit's changed files can be skipped, cutting testing time roughly in half. Ruby's Coverage module (up to 300% overhead, conflicts with simplecov) and TracePoint (~200–400%) were too slow. A C extension hooking RUBY_EVENT_LINE got overhead to 60–80%, and further gains came from rb_profile_frames to avoid string copies and from caching the rb_sourcefile pointer to skip repeated prefix checks. Code-less classes such as Active Record models emit no line events, so a small allocation profiler on RUBY_INTERNAL_EVENT_NEWOBJ adds the source files of instantiated classes. External services, processes and data files remain untracked and are handled through tracked-file lists and unskippable tests.
- Fast regex search: indexing text for agent tools · Cursor
Cursor mediumAdept
Agents lean heavily on regex search, and ripgrep's full scan can take over 15 seconds in large monorepos, so Cursor builds local indexes specifically to accelerate regex queries. The post traces the lineage of regex indexing: n-gram inverted indexes from Zobel et al. (1993) and Russ Cox's Google Code Search trigram approach, including how regexes are decomposed into trigram AND/OR queries, then livegrep's suffix arrays and GitHub Project Blackbird's trigram posting lists augmented with probabilistic masks (position and next-character bloom filters) to approximate '3.5-grams'. It weighs the tradeoffs of each: index size, query decomposition cost, and difficulty of dynamic updates.