Skip to content

release: 1.13.0 performance development line - #126

Merged
Antruly merged 11 commits into
masterfrom
release/1.13.0
Nov 29, 2026
Merged

Antruly merged 11 commits into
masterfrom
release/1.13.0

Conversation

@Antruly

@Antruly Antruly commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

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.
  • Version files, README badges/lines, CHANGELOG and RELEASE notes are set to 1.13.0; UVCPP_VERSION_IS_RELEASE is 1.
  • PostgreSQL prepared statement cache was implemented and tested, but the 50-core A/B regressed the median by 19.3%, so it is reverted from this branch and stays on perf/1.13-pg-prepared ([Perf 1.13.0] PostgreSQL 命名 prepared statement 缓存 #124, closed as not planned).
  • Docs and the JSON-reflect line reference were refreshed for the new header insertion.

Verification

  • Linux Release full build: 137/137.
  • 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.
  • GitHub Actions: 50 checks passed, 0 failed. AppVeyor is still queued (not a failure; it is external and has no result yet).

Performance evidence (local 50-core, not official)

Profile 1.12.0 median 1.13 median
baseline 233,621 235,376 (+0.75%)
pipelined 1,706,897 1,719,065 (+0.71%)

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

  • Annotated v1.13.0 tag and GitHub Release; will be created from this merged commit.
  • Official HttpArena run; the entry update is being prepared separately.

Refs #123.

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 reverts commit 75d1f3f, reversing
changes made to 6551783.
@Antruly
Antruly marked this pull request as ready for review November 29, 2026 00:53
@Antruly
Antruly merged commit 8a972bc into master Nov 29, 2026
50 of 52 checks passed
@Antruly
Antruly deleted the release/1.13.0 branch November 29, 2026 00:53
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