Skip to content

Miscellaneous performance optimizations#3624

Draft
ChihweiLHBird wants to merge 5 commits into
spinframework:mainfrom
ChihweiLHBird:zhiwei/optimization-1
Draft

Miscellaneous performance optimizations#3624
ChihweiLHBird wants to merge 5 commits into
spinframework:mainfrom
ChihweiLHBird:zhiwei/optimization-1

Conversation

@ChihweiLHBird

@ChihweiLHBird ChihweiLHBird commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Five small, low-risk hot-path cleanups (one commit each), no behavior change for the CLI:

  • telemetry: cache the OTel logs enablement check (OnceLock) instead of re-reading env vars on every guest log write
  • trigger-http: resolve the app name once at server construction instead of deserializing metadata on every request
  • key-value-spin: exists uses SELECT 1 … LIMIT 1 instead of fetching the whole value BLOB via get
  • llm-remote-http: move embedding vectors out of the response instead of cloning them
  • llm-local: clone only eos_token_id instead of the whole llama Config

Notes

  • Malformed name metadata now fails at server construction instead of per request (already caught earlier by the default factor stack, so unobservable in practice).
  • SQLite exists no longer decodes the value, matching the other backends' native existence probes.

…vironment on every guest log write.

Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
… of deserializing it from metadata on every request.

Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
…SELECT ... LIMIT 1 instead of fetching the whole value.

Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
…en building the embeddings result.

Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
…when resolving the EOS token.

Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant