Skip to content

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

Merged
asfernandes merged 5 commits intomasterfrom
work/udrperf-rework
Apr 1, 2024
Merged

Postfix for #7989 - Improve performance of external (UDR) functions#8046
asfernandes merged 5 commits intomasterfrom
work/udrperf-rework

Conversation

@asfernandes
Copy link
Copy Markdown
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.

Comment thread src/jrd/exe.cpp Outdated
Comment thread src/jrd/ExtEngineManager.cpp
Comment thread src/jrd/exe.cpp Outdated
Comment thread src/jrd/exe.cpp
Comment thread src/jrd/exe.cpp
JRD_reschedule(tdbb);

function->fun_external->execute(tdbb, request, transaction, inMsgLength, inMsg, outMsgLength, outMsg);
}
Copy link
Copy Markdown
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
Copy Markdown
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 requested a review from dyemanov March 18, 2024 09:57
@asfernandes asfernandes merged commit f1c4e00 into master Apr 1, 2024
@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