The methods ViewReview->formatSourceCode and ViewReview->highlightPhpCode take about 60% of the execution time. They both take a DOM and transform it into another DOM.
If the given file is not a php file, formatSourceCode transforms a DOM from another source.
A possible way to make this faster could be to somehow combine these two runs. The difficulty with that is that the separation of tasks only for php files and tasks for all files should be kept up.
The methods ViewReview->formatSourceCode and ViewReview->highlightPhpCode take about 60% of the execution time. They both take a DOM and transform it into another DOM.
If the given file is not a php file, formatSourceCode transforms a DOM from another source.
A possible way to make this faster could be to somehow combine these two runs. The difficulty with that is that the separation of tasks only for php files and tasks for all files should be kept up.