Skip to content
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

Postfix for #7989 - Improve performance of external (UDR) functions #8046

Merged
merged 5 commits into from
Apr 1, 2024

Conversation

asfernandes
Copy link
Member

Add missing profiling, savepoint and stack traces.

It became slower than what initially done in #7989, but still much faster than v5.

I edited new timings verified in test in #7989.

src/jrd/exe.cpp Outdated Show resolved Hide resolved
src/jrd/ExtEngineManager.cpp Show resolved Hide resolved
src/jrd/exe.cpp Outdated Show resolved Hide resolved
src/jrd/exe.cpp Show resolved Hide resolved
JRD_reschedule(tdbb);

function->fun_external->execute(tdbb, request, transaction, inMsgLength, inMsg, outMsgLength, outMsg);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if att_cancel_lock is active and cancellation request has been posted to our attachment, the external function cannot be cancelled during its execution. But maybe we should call tdbb->checkCancelState() immediately after its execution to react quickly? And maybe JRD_reschedule() will be not needed after that change, given that we always check out the engine during function invocation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see if it's now correct.

@asfernandes asfernandes merged commit f1c4e00 into master Apr 1, 2024
48 checks passed
@asfernandes asfernandes deleted the work/udrperf-rework branch April 1, 2024 00:59
dyemanov pushed a commit that referenced this pull request Nov 16, 2024
…8046)

* Postfix for #7989 - Improve performance of external (UDR) functions.

* Extract common functions.

* Fix profiler request time for external functions.

* Change cancellation detection for external functions.

* Move new private code to anonymous namesapce and rename functions.
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