stable

Clone or download

Read-only

Improve load performance for blob view

Part of request #12394: Blob view is slow Thanks to blackfire profiles, we should avoid as much as possible calls to Commit::PathToHash. Before this commit, to display a blob, we needed n calls to Commit::PathToHash: - 1 for the blob itself - 1 for each parent of the blob (to display its path) No we need ≃ 0 call: - hash is given in the url when we browse the tree (if hash is not present then we will still have to do one call but it is better than before) - we know use the path of the file to display… its path For example, to display the following file of Tuleap repository: plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Metadata/AlwaysThereField/Date/GreaterThanOrEqualComparisonFromWhereBuilder.php here are the gains, according to blackfire: Time: -1.72 s (-73%) 2.34 s β†’ 621 ms I/O Wait: -373 ms (-77%) 482 ms β†’ 109 ms CPU Time: -1.34 s (-72%) 1.86 s β†’ 513 ms Memory: -15 MB (-50%) 29.9 MB β†’ 14.9 MB This is a first step towards better performances on this view. It may not be perceptible enough, because syntax highlighting (GeSHi) consumes lot of resources and produce huge DOM to parse for the client. This should be dealt in a dedicated changeset. Change-Id: Ife686e81a9cc3f779c6058dc5975c3af1bce6d17

Modified Files

Name
M plugins/git/include/GitPHP/controller/Controller_Blob.php +14 βˆ’0 Go to diff View file
M plugins/git/templates/gitphp/tuleap/blob-header-title.tpl +2 βˆ’2 Go to diff View file
M plugins/git/templates/gitphp/tuleap/tree.tpl +1 βˆ’1 Go to diff View file