Miscellaneous performance optimizations#3624
Draft
ChihweiLHBird wants to merge 5 commits into
Draft
Conversation
…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>
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.
Summary
Five small, low-risk hot-path cleanups (one commit each), no behavior change for the CLI:
OnceLock) instead of re-reading env vars on every guest log writeexistsusesSELECT 1 … LIMIT 1instead of fetching the whole value BLOB viageteos_token_idinstead of the whole llamaConfigNotes
namemetadata now fails at server construction instead of per request (already caught earlier by the default factor stack, so unobservable in practice).existsno longer decodes the value, matching the other backends' native existence probes.