dstandish commented on PR #40568:
URL: https://github.com/apache/airflow/pull/40568#issuecomment-2211451593

   Alright... I might have something for you @ferruzzi 
   
   We can skip the V1Pod deserialization process (response -> json -> V1Pod) by 
adding the arg `_preload_content=False`
   
   Then, we can just convert to json and get the pod status with 
`data["status"]["phase"]`
   
   In my testing this results in 40x speedup, so presumably, much less CPU 
intensive.   
   
   [k8s_api.txt](https://github.com/user-attachments/files/16113945/k8s_api.txt)
   
   You can test yourself by running locally with arg `pod` vs `raw`.   You'll 
need to update the hardcoded pod name.
   
   But yeah my results were consistently 20 seconds vs 0.5 seconds (with 10,000 
operations)


-- 
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]

Reply via email to