Hi, I've been tasked to look at performance issues we are having with STS with our medium sized project. Something wierd I've found is that I get a huge usability difference when I change one of the settings on the AJDT Event Trace 'Configure AJDT Event Trace' panel.
(STS Version: 2.5.2.RELEASE Build Id: 201101081000)
I'll click 'Restore default settings' and change some whitespace in a source file. Here's the AJDT Trace output:
11:9:32 ================================================== =========================================
11:9:32 Build kind = AUTOBUILD
11:9:32 Project=tcm, kind of build requested=Incremental AspectJ compilation
11:9:32 Timer event: 0ms: Flush included source file cache
11:9:32 Timer event: 15ms: Check delta
11:9:32 File: <XXX>CaseRecordController.java has changed.
11:9:32 build: Examined delta - 1 changed, 0 added, and 0 deleted source files in required project tcm
11:9:32 Timer event: 0ms: Looking for and marking configuration changes in tcm
11:9:32 Configuration changes found: true
11:9:32 Timer event: 0ms: Look for source/resource changes
11:9:32 Setting list of classpath elements with modified contents:
11:9:32 [C:/rh-workspace2/tcm/src/main/webapp/WEB-INF/classes]
11:9:32 Timer event: 31ms: Pre compile
11:9:32 Sending the following configuration changes to the compiler: []
11:9:32 1 source file changes since last build
11:9:32 Compiler configuration for project tcm has been read by compiler. Resetting.
11:9:32 Configuration was []
11:9:32 Resetting list of modified source files. Was [C:\XXX\CaseRecordController.java]
11:9:32 ClassFileChangeChecking: failed to find a state instance managing output location : C:\rh-workspace2\tcm\src\main\webapp\WEB-INF\classes
11:9:32 ClassFileChangeChecking: queried JDT and 'C:\rh-workspace2\tcm\src\main\webapp\WEB-INF\classes' is apparently unchanged so not performing timestamp check
11:9:32 Preparing for build: planning to be an incremental build
11:9:32 Starting incremental compilation loop 1 of possibly 5
11:9:33 Timer event: 657ms: Time to first compiled message
11:9:33 Timer event: 704ms: Time to first woven message
11:9:33 AspectJ reports build successful, build was: INCREMENTAL
11:9:33 AJDE Callback: finish. Was full build: false
11:9:33 Timer event: 813ms: Total time spent in AJDE
11:9:33 Timer event: 0ms: Refresh after build
11:9:33 Types affected during build = 1
11:9:33 Timer event: 1063ms: Total time spent in AJBuilder.build()
11:9:33 Timer event: 0ms: Update visualizer, xref, advice listeners for (separate thread): tcm
11:9:34 Timer event: 578ms: Delete markers: tcm (Finished deleting markers for tcm)
11:9:47 Timer event: 13250ms: Create markers: tcm (Finished creating markers for tcm)
11:9:47 Created 5341 markers in 763 files
OK, so without going too deply into the trace output, the painful part is quite obvious - after making a simple change I'm having to wait 15 seconds (from the first trace to last). It is pretty consistently this bad.
Now, when I change the trace option to Enable trace output of 'Model Sanity Check' and make a whitespace change to my code I get a slightly different trace:
11:14:33 ================================================== =========================================
11:14:33 Build kind = AUTOBUILD
11:14:33 Project=tcm, kind of build requested=Incremental AspectJ compilation
11:14:33 Timer event: 0ms: Flush included source file cache
11:14:33 Timer event: 15ms: Check delta
11:14:33 File: C:\XXX\CaseRecordController.java has changed.
11:14:33 build: Examined delta - 1 changed, 0 added, and 0 deleted source files in required project tcm
11:14:33 Timer event: 16ms: Looking for and marking configuration changes in tcm
11:14:33 Configuration changes found: true
11:14:33 Timer event: 16ms: Look for source/resource changes
11:14:33 Setting list of classpath elements with modified contents:
11:14:33 [C:/rh-workspace2/tcm/src/main/webapp/WEB-INF/classes]
11:14:33 Timer event: 31ms: Pre compile
11:14:33 Sending the following configuration changes to the compiler: []
11:14:33 1 source file changes since last build
11:14:33 Compiler configuration for project tcm has been read by compiler. Resetting.
11:14:33 Configuration was []
11:14:33 Resetting list of modified source files. Was [C:\XXX\CaseRecordController.java]
11:14:33 ClassFileChangeChecking: failed to find a state instance managing output location : C:\rh-workspace2\tcm\src\main\webapp\WEB-INF\classes
11:14:33 ClassFileChangeChecking: queried JDT and 'C:\rh-workspace2\tcm\src\main\webapp\WEB-INF\classes' is apparently unchanged so not performing timestamp check
11:14:33 Preparing for build: planning to be an incremental build
11:14:33 Starting incremental compilation loop 1 of possibly 5
11:14:33 Timer event: 672ms: Time to first compiled message
11:14:33 Timer event: 719ms: Time to first woven message
11:14:33 AspectJ reports build successful, build was: INCREMENTAL
11:14:33 AJDE Callback: finish. Was full build: false
11:14:33 Timer event: 828ms: Total time spent in AJDE
11:14:33 Timer event: 0ms: Refresh after build
11:14:33 Types affected during build = 1
11:14:34 Timer event: 47ms: Delete markers: tcm (Finished deleting markers for tcm)
11:14:35 Timer event: 1015ms: Create markers: tcm (Finished creating markers for tcm)
11:14:35 Created 5341 markers in 763 files
11:14:36 Crosscutting model sanity checked. The following problems found:
<snipped a bunch of stuff here>
11:14:36
11:14:36 Timer event: 1937ms: Model sanity check for: tcm
11:14:36 Timer event: 3015ms: Total time spent in AJBuilder.build()
11:14:37 Timer event: 0ms: Update visualizer, xref, advice listeners for (separate thread): tcm
The killer for me here is that with additional trace detail it now only takes 4 seconds. And while 4 seconds is still slow, it is a whole lot better than 15 seconds, after which my mind has travelled far away from what I'm supposed to be doing.
This is a huge improvement for me - maybe it will help others? And maybe someone could look in to this because I would not have expected changing trace output to change behaviour in this way.


Reply With Quote
