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

#11834 Use reversed instead of creating a copy of slotData for every call to _getSlotValue #11833

Merged
merged 6 commits into from
Mar 28, 2023

Conversation

dreid
Copy link
Contributor

@dreid dreid commented Mar 27, 2023

Scope and purpose

Fixes #11834

Contributor Checklist:

This process applies to all pull requests - no matter how small.
Have a look at our developer documentation before submitting your Pull Request.

Below is a non-exhaustive list (as a reminder):

  • The title of the PR should describe the changes and starts with the associated issue number, like “#9782 Remove twisted.news. #1234 Brief description”.
  • A release notes news fragment file was create in src/twisted/newsfragments/ (see: Release notes fragments docs.)
  • The automated tests were updated.
  • Once all checks are green, request a review by leaving a comment that contains exactly the string please review.
    Our bot will trigger the review process, by applying the pending review label
    and requesting a review from the Twisted dev team.

… _getSlotValue

This takes a large sphinx build with pydoctor from a 22 minute runtime to a 15 min runtime.
@dreid dreid changed the title Use reversed instead of creating a copy of slotData for every call to _getSlotValue #11834 Use reversed instead of creating a copy of slotData for every call to _getSlotValue Mar 28, 2023
@dreid dreid marked this pull request as ready for review March 28, 2023 18:35
@chevah-robot chevah-robot requested a review from a team March 28, 2023 18:35
@dreid
Copy link
Contributor Author

dreid commented Mar 28, 2023

I do not understand the pypy failures. It seems unrelated but also it seems to fail consistently. I'm I couldn't find any other examples of similar failures on outstanding PRs but I only checked 3 or 4.

@exarkun
Copy link
Member

exarkun commented Mar 28, 2023

I do not understand the pypy failures. It seems unrelated but also it seems to fail consistently. I'm I couldn't find any other examples of similar failures on outstanding PRs but I only checked 3 or 4.

The most recent trunk run has exactly these failures.

Copy link
Member

@exarkun exarkun left a comment

Choose a reason for hiding this comment

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

I couldn't get the speedscope URL to load which I'm a bit sad about.

I also made a suggestion for a change to the news fragment.

The CI failures look pre-existing to me.

Please adjust the news fragment and then merge.

Thanks.

dreid and others added 2 commits March 28, 2023 13:34
Co-authored-by: Jean-Paul Calderone <exarkun@twistedmatrix.com>
@dreid
Copy link
Contributor Author

dreid commented Mar 28, 2023

@exarkun Thank you for the review, bummer about the speedscope link. I've updated the news fragment. I do not have permissions to merge PRs.

@glyph glyph enabled auto-merge March 28, 2023 21:47
@glyph glyph merged commit 525da4a into twisted:trunk Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

twisted.web._flatten._getSlotValue copies slotData on every call.
4 participants