Bug #41818

Development Performance: Improve performance of Compile Run if no changes appeared

Added by Sebastian Kurfuerst over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Should have
Category:
Core
Start date:
2012-10-10
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

I profiled performance of development context; and found the following:

  • A lot of time is spent during typo3.flow:objectmanagement:proxyclasses - as expected. For my neos instance, roughly 1.8 seconds of 3.1 seconds of Neos Development Mode (See before.png -- the white bar is proxy class building.
  • When drilling down into the compile-time run which is then executed, you see that lots of time is spent inside typo3.flow:objectmanagement:compiletime:finalize -- 1.2 of a total of 1.5 seconds. (before-compiletime.png)
  • If there were no changes to the source files, the CoreCommandController::compileCommand just returns early
    • Actually, you see that we only need to fully initialize the object manager in the compile command if anything changed.

Goal: If no changes occured, do not run the typo3.flow:objectmanagement:compiletime:finalize command, such that the compile-time run only runs for 0.3 seconds in my case.

  • After the optimization is applied, you see inside comparison-before-after.png that the runtime goes down from about 3.1 to 1.8 seconds if there were no changes to source files.

This is mostly work in progress and meant as a discussion base

See the attached changeset at https://review.typo3.org/#/c/15472/ for a WIP implementation


Files

before.png (7.52 KB) before.png Sebastian Kurfuerst, 2012-10-10 09:40
before-compiletime.png (59.8 KB) before-compiletime.png Sebastian Kurfuerst, 2012-10-10 09:40
comparison-before-after.png (51.8 KB) comparison-before-after.png Sebastian Kurfuerst, 2012-10-10 09:40
#1

Updated by Gerrit Code Review over 8 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/15472

#2

Updated by Gerrit Code Review over 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/15580

#3

Updated by Christopher Hlubek over 8 years ago

I found another way of speeding up the compilation. We should try if http://review.typo3.org/15580 works correctly and reliable for code recompilation. At least for most non-Flow core code this should be a sufficient and dramatic improvement since no command execution is necessary, which I think causes most of the delay.

#4

Updated by Christopher Hlubek over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF