Skip to content

[http] use more efficient TMethodCall invocation#22549

Merged
linev merged 3 commits into
root-project:masterfrom
linev:http_exe_json
Jun 10, 2026
Merged

[http] use more efficient TMethodCall invocation#22549
linev merged 3 commits into
root-project:masterfrom
linev:http_exe_json

Conversation

@linev

@linev linev commented Jun 9, 2026

Copy link
Copy Markdown
Member

When processing exe.json request, TMethodCall is used to invoke object method. Before all method arguments were packed into one string and provided as TMethodCall constructor. Main problem - interpreter involved every time and this leads to memory leak. Plus issue with escape symbols.

Try to use different signature of TMethodCall::Execute where arguments parsed and stored as plain vector of pointers on these arguments. Such signature does not invoke interpreter and should avoid memory leak

Address issue #22501

When processing exe.json request, TMethodCall is used to invoke object method.
Before all method arguments were packed into one string and provided
as TMethodCall constructor. Main problem - interpreter involved every time
and this leads to memory leak. Plus issue with escape symbols.

Try to use different signature of TMethodCall::Execute where arguments
parsed and stored as plain vector of pointers on these arguments.
Such signature does not invoke interpreter and should avoid memory leak
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Test Results

    21 files      21 suites   3d 9h 7m 28s ⏱️
 3 864 tests  3 863 ✅ 0 💤 1 ❌
73 724 runs  73 723 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit da0af8d.

♻️ This comment has been updated with latest results.

linev added 2 commits June 10, 2026 10:12
When exe.json executed for same method many times create TMethodCall once
and reuse it. Should significantly reduce memory fragmentation from cling and
probably avoid memory leaks.
Add test of multiple invocation of SetTitle in exe.json.
Checks that cache works properly
@linev linev merged commit 5c8beb2 into root-project:master Jun 10, 2026
29 of 33 checks passed
@linev linev deleted the http_exe_json branch June 10, 2026 18:19
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.

2 participants