stable
Clone or download
The addition of the status and of the author as a Tuleap user has slow down tremendously the retrieval of commit representations. Consequently, the REST routes allowing to retrieve tags, branches or the commits of a pull request can be too slow to be usable in the web UI. This contribution solves the issue on working on the two root causes: * an index has been added on the user table to be able to quickly find users matching an email. * the number of SQL queries has been reduced. For getting the representations of a set of n commits, 2*n queries were necessary now only 2 queries are needed. This is part of: - story #10414: have a branch/tag selector - story #11664: display list of commits of a pull request Change-Id: I36e1b3ed36545772f43edc8daf6ebeccc6fc438b
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/git/include/CommitMetadata/CommitMetadata.php | +57 | −0 | Go to diff View file |
A | plugins/git/include/CommitMetadata/CommitMetadataRetriever.php | +68 | −0 | Go to diff View file |
M | plugins/git/include/CommitStatus/CommitStatusDAO.php | +19 | −7 | Go to diff View file |
M | plugins/git/include/CommitStatus/CommitStatusRetriever.php | +24 | −5 | Go to diff View file |
M | plugins/git/include/REST/v1/GitCommitRepresentation.php | +4 | −4 | Go to diff View file |
M | plugins/git/include/REST/v1/GitCommitRepresentationBuilder.php | +22 | −11 | Go to diff View file |
A | plugins/git/include/REST/v1/GitCommitRepresentationCollection.php | +57 | −0 | Go to diff View file |
M | plugins/git/include/REST/v1/RepositoryResource.class.php | +29 | −5 | Go to diff View file |
M | plugins/git/phpunit/CommitStatus/CommitStatusRetrieverTest.php | +38 | −4 | Go to diff View file |
R | plugins/pullrequest/include/PullRequest/REST/v1/GitCommitRepresentationCollection.php | Go to diff View file | ||
M | plugins/pullrequest/include/PullRequest/REST/v1/PullRequestsCommitRepresentationFactory.php | +12 | −9 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/REST/v1/PullRequestsResource.php | +3 | −2 | Go to diff View file |
A | src/common/User/UserEmailCollection.php | +47 | −0 | Go to diff View file |
M | src/common/User/UserManager.class.php | +16 | −8 | Go to diff View file |
M | src/common/dao/UserDao.class.php | +20 | −0 | Go to diff View file |
M | src/db/mysql/database_structure.sql | +1 | −0 | Go to diff View file |
A | src/db/mysql/updates/2018/201809271500_add_index_user_mail.php | +37 | −0 | Go to diff View file |