Repository navigation
release: 1.13.0 performance development line - #126
Merged
Merged
Conversation
Expose uvcpp_web_request::query_param_view() for one-parameter lookup without building query_params()'s vector of string pairs. The unencoded path returns a view into query_string_; queries containing % or + reuse the existing decoder and keep the same semantics as query(). The new path is covered by the request functional suite, including bare keys, empty values, duplicate keys, encoded keys and invalid percent sequences. Existing query_params() and query() behavior is unchanged. Refs #123, #125.
Prepare a PostgreSQL statement once per connection with PQsendPrepare and reuse it through PQsendQueryPrepared, instead of sending every query as an unnamed PQsendQueryParams statement that PostgreSQL parses and plans again. The cache is bounded at 64 entries per connection; when full, new SQL falls back to the previous unnamed path. A failed prepare removes its pending entry and reports the existing status contract; 26000 on execute evicts the stale entry without retrying the query. Connection close clears the cache and statement names remain monotonic. The async PostgreSQL functional suite now covers cache hits with changing parameters, multiple statements, prepare failure, server-side DEALLOCATE, reconnect isolation and the 64-entry bound. Refs #123, #124.
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.
What
Release the 1.13.0 line:
uvcpp_web_request::query_param_view(): zero-allocation lookup for unencoded query parameters; encoded queries reuse the existing decoder and keep the same semantics. Ref [Perf 1.13.0] HTTP/1.1 零分配查询参数读取 #125.1.13.0;UVCPP_VERSION_IS_RELEASEis1.perf/1.13-pg-prepared([Perf 1.13.0] PostgreSQL 命名 prepared statement 缓存 #124, closed as not planned).Verification
ctest: 135/135 passed; PostgreSQL URL-gated cases passed separately against PostgreSQL 16 (db_pgsql_async_func,db_pgsql_func,db_transaction_server_func).check_docs.py,check_doc_lines.py,check_doc_versions.py --this-is-a-release: green.package_release.py --platform linux-x64: produced a 2.6 MiB archive with 239 files after staging the system libuv headers.Performance evidence (local 50-core, not official)
Baseline per-request CPU 1,516.4% -> 1,464.2%, p99 median 33.2 ms -> 30.4 ms. The throughput delta is small and generator-bound; the CPU/p99 direction is the useful part. The benchmark entry must opt into
query_param_view(); the library does not silently rewrite handlers.Not yet done
v1.13.0tag and GitHub Release; will be created from this merged commit.Refs #123.