sjyango commented on code in PR #58993:
URL: https://github.com/apache/doris/pull/58993#discussion_r2659473867
##########
be/src/udf/python/python_udf_runtime.h:
##########
@@ -81,7 +73,23 @@ class PythonUDFProcess {
bool is_alive() const {
Review Comment:
I've merged these two APIs into one, using a `force_check` parameter to
distinguish between them. The reason for this distinction is that invoking
`running` on a `boost::process::child` to check the process status triggers a
system call. Frequent calls would result in excessive context switches between
user space and kernel space, negatively impacting performance. Therefore, I've
implemented caching here—`boost::process::child::running()` is actually called
only once every 5,000 invocations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]