Development Performance: Improve performance of Compile Run if no changes appeared
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
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.