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

Modified Backport of #4619 #4656

Closed
wants to merge 7 commits into from

Conversation

nathaniel-may
Copy link
Contributor

@nathaniel-may nathaniel-may commented Feb 1, 2022

resolves #4569

Description

This commit defers the expensive function dump_graph to only be called in the event the value is going to be logged. Without this change, users always generate this expensive graph regardless of the value of the flag --log-cache-events.

This backport of #4619 is separate from the original commit so that we do not have to backport #4505 which introduced mashumaro as the internal serializer for the events module. In order to keep this backport simple, I implemented it by passing python functions as values and silencing mypy to get type checking to pass. All tests from the original commit have been backported and adapted to this strategy.

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change

@nathaniel-may
Copy link
Contributor Author

Closing in favor of #4660

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.

1 participant