Skip to content

Optimize config.lookup_package check in trace_end #268

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
merged 1 commit into from
Aug 17, 2022

Conversation

symwell
Copy link
Contributor

@symwell symwell commented Aug 17, 2022

Doing config.lookup_package check first returns early in 98.7% of cases in sample_app_6th_ed.

APPMAP=true DISABLE_SPRING=true GEM_HOME=gems bundle exec rails test > lambda_hook.txt

$ cat lambda_hook.txt | grep 'trace_end_hook_body_3' | wc -l
5863

$ cat lambda_hook.txt | grep 'trace_end_hook_body_3.5' | wc -l
74

It decreased instance_methods.each(&hook.(cls)) execution from 0.169 to 0.079.

Total execution time of trace_end decreased from 0.279 to 0.104

Addresses https://github.com/applandinc/board/issues/129

@symwell symwell changed the title Optimize config.lookup_package check in trace_end Optimize config.lookup_package check in trace_end Aug 17, 2022
@kgilpin kgilpin merged commit 2dfad35 into master Aug 17, 2022
@kgilpin kgilpin deleted the sw/faster_trace_end_hook branch August 17, 2022 16:05
@appland-release
Copy link

🎉 This PR is included in version 0.87.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants