Skip to content

perf(profiling): Additionl performance improvements to the profiler #1991

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

Merged

Conversation

Zylphrex
Copy link
Member

@Zylphrex Zylphrex commented Apr 6, 2023

This change adds additional performance improvements to the profiler after observing the following:

  • extracting the full frame information is expensive, but we only need to do it once since the subsequent occurrences can reuse previous results
  • the abs_path + lineno is sufficient to uniquely identify a frame, so use that as the frame key

This change adds additional performance improvements to the profiler after
observing the following:
- extracting filename information is expensive, so add a cache on to allow reuse
  of results
- extracting the full frame information is expensive, but we only need to do it
  once since the subsequent occurrences can reuse previous results
- the abs_path + lineno is sufficient to uniquely identify a frame, so use that
  as the frame key
@Zylphrex Zylphrex marked this pull request as draft April 6, 2023 15:30
@Zylphrex Zylphrex marked this pull request as ready for review April 11, 2023 15:35
@Zylphrex Zylphrex requested review from antonpirker, sl0thentr0py and a team April 11, 2023 15:35
@Zylphrex Zylphrex merged commit 8df02bf into master Apr 12, 2023
@Zylphrex Zylphrex deleted the txiao/perf/additional-performance-improvements-to-the-profiler branch April 12, 2023 13:47
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