Skip to content

Conversation

tonybaloney
Copy link
Contributor

This change moves the logging call inside the function invocation callback into a thread pool executor (With a max size of 1).
Effectively allows the logging call to happen concurrently with the function invocation.

In real-terms, with a patched function host, the response times were:

50 66 75 80 90 95 98 99
Original 15 17 18 20 27 42 58 64
Patched 14 16 17 19 26 35 47 57

screenshot 2022-06-01 at 11 37 55

At the 95th percentile an improvement of 7ms per request (18%).

IF the customer is using logging inside their function, we should consider making the thread pool executor available/patched on the logger instance.

gavin-aguiar
gavin-aguiar previously approved these changes Jun 1, 2022
@tonybaloney
Copy link
Contributor Author

This should be extended to cover the customer logging function code as well. The Python HTTP function demo spends 70% of its time on line 7

image

@tonybaloney
Copy link
Contributor Author

image
With the threaded logger.

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.

3 participants