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

refactor: improves performance of the library #59

Merged
merged 8 commits into from
Apr 8, 2020
Merged

Conversation

jcchavezs
Copy link
Owner

This PR introduces some improvements in the library:

  1. Introduces the onKernelResponse listener to have more accurate measurements of request latency.
  2. Runs the flushTracer on the onKernelTerminate listener without the register_shutdown_function as this is the symfony idiomatic way to do expensive operations after serving the response (see https://symfony.com/doc/current/reference/events.html#kernel-terminate).
  3. Retrieves the tracer and the extractor on construct instead of doing it every time a request comes in. This is no difference in PHP SAPI model but it is an improvement in the event loop model.

@jcchavezs
Copy link
Owner Author

Ping @mmoreram

@jcchavezs jcchavezs merged commit 68004ba into master Apr 8, 2020
@jcchavezs jcchavezs deleted the improvements branch April 8, 2020 20:42
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.

None yet

1 participant