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 danielbachhuber added this to the 2.8 milestone Apr 27, 2018

@danielbachhuber danielbachhuber requested review from WordPress/gutenberg-core and removed request for WordPress/gutenberg-core Apr 27, 2018

@mkaz

This comment has been minimized.

Copy link
Member

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

@mkaz
mkaz approved these changes Apr 27, 2018
Copy link
Member

left a comment

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

2 checks passed

codecov/project 44.02% remains the same compared to 41594cd
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@danielbachhuber danielbachhuber deleted the switch-rest-get-server branch Apr 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.