Skip to content

Discovery around adding performance profiling/testing #1017

@westonruter

Description

@westonruter

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.

Metadata

Metadata

Assignees

Labels

EnhancementNew feature or improvement of an existing one

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions