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

fix: make xhprof faster, fixes #5712 #5721

Merged
merged 1 commit into from Jan 26, 2024

Conversation

LionsAd
Copy link
Collaborator

@LionsAd LionsAd commented Jan 20, 2024

The Issue

xhprof_prepend.php uses:

xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);

This makes xhprof unnecessary slow. (~ 50% more overhead on function calls)

How This PR Solves The Issue

It uses just:

xhprof_enable(XHPROF_FLAGS_MEMORY);

Manual Testing Instructions

Ensure that xhprof output does no longer show the CPU columns and generally has less function call overhead.

Automated Testing Overview

Tests should not be affected, because they only test the existence of a run and not the run itself.

Related Issue Link(s)

#5712

Release/Deployment Notes

None

@LionsAd LionsAd requested review from a team as code owners January 20, 2024 23:13
@LionsAd LionsAd changed the title fix: Make xhprof faster, fixes #5712 fix: make xhprof faster, fixes #5712 Jan 20, 2024
Copy link

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me, although I haven't yet manually tested. I hope that people don't depend on the CPU feature.

@stasadev stasadev merged commit 5efc9c1 into ddev:master Jan 26, 2024
28 checks passed
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.

None yet

3 participants