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

Switch to rest_get_server() for compat with trunk #6474

Merged
merged 1 commit into from
Apr 27, 2018

Conversation

danielbachhuber
Copy link
Member

@danielbachhuber danielbachhuber added this to the 2.8 milestone Apr 27, 2018
@danielbachhuber danielbachhuber requested review from a team and removed request for a team April 27, 2018 19:58
@danielbachhuber danielbachhuber added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Apr 27, 2018
@mkaz
Copy link
Member

mkaz commented Apr 27, 2018

Looks like the relevant info for why is from Ticket #41641
https://core.trac.wordpress.org/ticket/41641

The excessive memory consumption looks like it's mostly down to dangling references to Spy_REST_Server due to using $this->server, preventing garbage collection. Removing this var and replacing with a direct call to rest_get_server() gets running phpunit --group restapi locally down from 466.00MB to 102.00MB, and running the whole single site test suite from 502.20MB to 134.20MB

Copy link
Member

@mkaz mkaz left a comment

Choose a reason for hiding this comment

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

Seeing the same change on core, this looks pretty straight-forward. Ran through the unit tests without a problem. 👍

@danielbachhuber danielbachhuber merged commit a7b0835 into master Apr 27, 2018
@danielbachhuber danielbachhuber deleted the switch-rest-get-server branch April 27, 2018 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants