Repository navigation
Profile with hotpath and speed up result encoding - #14
Merged
Merged
Conversation
Add hotpath behind `hotpath`/`hotpath-alloc`/`hotpath-cpu` features (no-op otherwise) and instrument the headless query, schema and profile paths. What the profile showed, and the fixes: - Tagged cells (DECIMAL, DATE, TIMESTAMP, TIME, BLOB) cost ~5x a plain one: build the map at its final size and use static unit names instead of `json!` and a `Debug` render. - `ducklocal query` spent ~40% of its time freeing the result just before exiting; forget it after printing. End to end 20-26% faster at 2M cells. - An analysis app's `query()` deep-copied the result twice: in `capture::query` even when nothing was recording, and per cell in `query_value`. Skip the first, move cells in the second. - Grid dates and timestamps were formatted through chrono's strftime path; write the fields directly (117 -> 94 ms, 3.7M -> 2.5M allocations for 1.2M cells, new probe A4). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add hotpath behind
hotpath/hotpath-alloc/hotpath-cpufeatures (no-op otherwise) and instrument the headless query, schema and profile paths.What the profile showed, and the fixes:
json!and aDebugrender.ducklocal queryspent ~40% of its time freeing the result just before exiting; forget it after printing. End to end 20-26% faster at 2M cells.query()deep-copied the result twice: incapture::queryeven when nothing was recording, and per cell inquery_value. Skip the first, move cells in the second.