/admin/tests is very slow
https://bugs.webkit.org/show_bug.cgi?id=158682

Reviewed by Chris Dumez.

The slowness came from TestNameResolver::__construct, which was fetching the entire table of test_configurations,
which at this point contains more than 32,000 rows. Don't fetch the entire table in the constructor. Instead,
fetch a subset of rows as needed in configurations_for_metric_and_platform. Even though this results in many SQL
queries being issued, that's a lot more efficient in practice because we only fetch a few dozen rows in practice.

Also removed a whole bunch of features from /admin/tests to simplify the page. In particular, the ability to update
the list of triggerables has been removed now that sync-buildbot.js automatically updates that for us. This removed
the last use of test_exists_on_platform, which was also dependent on fetching test_configurations upfront.

* public/admin/tests.php:
* public/include/test-name-resolver.php:
(TestNameResolver::__construct): Don't fetch the entire table of test_configurations.
(TestNameResolver::configurations_for_metric_and_platform): Just issue a SQL query for the specified platform and metric.
(TestNameResolver::test_exists_on_platform): Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@202000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3 files changed