Bug #41818

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

Added by Sebastian Kurfuerst almost 3 years ago. Updated almost 3 years ago.

Status:Resolved Start date:2012-10-10
Priority:Should have Due date:
Assigned To:Sebastian Kurfuerst % Done:

100%

Category:Core
Target version:TYPO3 Flow Base Distribution - 2.0 beta 1
PHP Version: Complexity:
Has patch:No Affected Flow version:(any)

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

before.png (7.5 kB) Sebastian Kurfuerst, 2012-10-10 09:40

before-compiletime.png (59.8 kB) Sebastian Kurfuerst, 2012-10-10 09:40

comparison-before-after.png (51.8 kB) Sebastian Kurfuerst, 2012-10-10 09:40

Associated revisions

Revision c9f04ee0
Added by Christopher Hlubek almost 3 years ago

[BUGFIX] Remove unnecessary call for code compilation

This change removes the forced compile command subrequest
in a non Production context. Proxy classes are only
initialized if the code cache is not up to date or with
a special second check after file monitoring was run.

This speeds up the development context quite enormous
if no code was changed.

Change-Id: Ifd06e26d340a501fe3a0226b70c6dda3c4035cde
Fixes: #41818
Releases: 1.2

History

#1 Updated by Gerrit Code Review almost 3 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 almost 3 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 almost 3 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 almost 3 years ago

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

Also available in: Atom PDF