-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Avoid memory copy in RESTful search and query #37674
Conversation
Signed-off-by: bigsheeper <[email protected]>
Benchmark:
1KB
|
@bigsheeper cpp-unit-test check failed, comment |
rerun cpp-unit-test |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #37674 +/- ##
==========================================
- Coverage 82.90% 82.46% -0.44%
==========================================
Files 1067 1068 +1
Lines 164517 165259 +742
==========================================
- Hits 136391 136279 -112
- Misses 22668 23543 +875
+ Partials 5458 5437 -21
|
Signed-off-by: bigsheeper <[email protected]>
@bigsheeper E2e jenkins job failed, comment |
/approve |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bigsheeper, czs007, xiaofan-luan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/run-cpu-e2e |
@bigsheeper E2e jenkins job failed, comment |
/run-cpu-e2e |
@bigsheeper E2e jenkins job failed, comment |
@bigsheeper cpp-unit-test check failed, comment |
@bigsheeper E2e jenkins job failed, comment |
/lgtm |
Custom
jsonRender
that encodes JSON data directly into the response stream, it uses less memory since it does not buffer the entire JSON structure before sending it, unlikec.JSON
inHTTPReturn
, which serializes the JSON fully in memory before writing it to the response.Benchmark testing shows that, using the custom render incurs no performance loss and reduces memory consumption by nearly 50%.
issue: #37671