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

Discovery around adding performance profiling/testing #1017

Closed
5 tasks
westonruter opened this issue Mar 13, 2018 · 4 comments
Closed
5 tasks

Discovery around adding performance profiling/testing #1017

westonruter opened this issue Mar 13, 2018 · 4 comments
Assignees
Labels
Enhancement New feature or improvement of an existing one

Comments

@westonruter
Copy link
Member

westonruter commented Mar 13, 2018

In light of #993 it is clear we need more performance profiling in place for the plugin.

  • Using the scripts used to populate a site with test content, generate a post fully populated with embeds, widgets, and comments, with enough lorem ipsum text to count as a long-form post. Then with the “AMP Conf” theme active, capture the source of the page. Then save the output to tests directory for use in testing.
  • Run Xdebug profiler and do a sanity check for performance bottlenecks.
  • Add a PHPUnit test for performance, loading up the captured HTML output and making sure the processing of the HTML does not take more than a reasonable amount of time.
  • Ensure that external HTTP requests are mocked to prevent network requests from causing periodic failures. (Aside: Make sure all other requests in tests are also mocked to prevent any external requests from hitting the network when running tests.)
  • Add a new test suite that includes the performance testing and also the slow runInSeparateProcess tests. Let this test suite be run with all the others on Travis CI, but exclude it by default on the local environment. Or rather, as in the case of Gutenberg, use environment variable for this same purpose. A separate testsuite/group seems better.

See also #990 for sending back server timings via HTTP response headers.

@westonruter westonruter added this to the v0.7 milestone Mar 13, 2018
@westonruter westonruter changed the title Add performance Add performance profiling/testing Mar 13, 2018
@westonruter
Copy link
Member Author

@westonruter westonruter removed this from the v0.7 milestone Apr 10, 2018
@westonruter westonruter self-assigned this Dec 5, 2018
@westonruter westonruter added this to the v2.0 milestone Jul 15, 2019
@swissspidy swissspidy added the Enhancement New feature or improvement of an existing one label Jul 16, 2019
@westonruter westonruter removed their assignment Aug 13, 2019
@westonruter westonruter removed this from the v2.0 milestone Sep 3, 2019
@MackenzieHartung MackenzieHartung changed the title Add performance profiling/testing Discovery around adding performance profiling/testing Sep 5, 2019
@schlessera
Copy link
Collaborator

I talked about this with @amedina and suggested to look into the Blackfire profiler I had already mentioned. This has built-in support for CI integration, and although this is only provided in the paid edition, it is probably still cheaper than building such a system from scratch using Xdebug.

@archon810
Copy link

#2069 (comment) shows just how bad validation could get. 3s normal WP functions after pressing Update, then a 9s AMP validation.

@schlessera
Copy link
Collaborator

Added #3361 as a result of this discovery ticket. Closing this for now. If we decide not to proceed with Blackfire, we can reopen again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or improvement of an existing one
Projects
None yet
Development

No branches or pull requests

5 participants