Improve performance

Bug #1224059 reported by Ian Brandt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Plugin for Eclipse
New
Medium
Unassigned

Bug Description

First off thank you for all the recent work to bring this plugin up to date!

I isolated BzrEclipse while troubleshooting performance issues with the several plugins I use. As the only plugin over a base Kepler for Java EE Developers install it adds around 10 seconds to a Clean/Build Automatically for my multi-module Maven project. I used the VisualVM Sampler to capture CPU activity for each build. I'm attaching the snapshots in case it would be of any help in performance tuning BzrEclipse. While 10s isn't a lot, with multiple Eclipse plugins it all adds up pretty fast.

The main hot spot appears to be the following under the "xmlrpc-service_stdout>null" thread:

* org.vcs.bazaar.client.utils.StreamRedirect.run() 46,701 ms
** java.io.InputStreamReader.read() 46,701 ms
** Self time 0.000 ms

I'm guessing this has to do with waiting on the output of external bzr invocations, so perhaps there is not much more that could be done here.

The snapshots can be loaded in VisualVM via File > Load... > File Format: Profiler Snapshots

Revision history for this message
Ian Brandt (ian-ianbrandt) wrote :
Revision history for this message
Ian Brandt (ian-ianbrandt) wrote :
Revision history for this message
Piotr Piastucki (piastucki) wrote :

Thanks for the report.
Just 2 additional quick questions:
1) what version of bzr-eclipse are you using?
2) is file text decorator enabled or not (Bazaar->Label Decorations->Enable file text decorator)?

Revision history for this message
Ian Brandt (ian-ianbrandt) wrote :

Version is 1.2.1.

File text decorator is not enabled. Just "Enable status overlay decorator" is checked on that preference page.

Also I have the parent project as well as the nested 14 module projects imported and "shared".

Revision history for this message
Ian Brandt (ian-ianbrandt) wrote :

My Bazaar version is:

$ bzr version
Bazaar (bzr) 2.6.0
  Python interpreter: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python 2.7.5
  Python standard library: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
  Platform: Darwin-10.8.0-x86_64-i386-64bit

Revision history for this message
Piotr Piastucki (piastucki) wrote :

Than you very much for the info. I am not worried about java.io.InputStreamReader.read(), it just waits for some input and hence there is no input it should not really consume any CPU time.

I am more worried about multiple threads triggering org.vcs.bazaar.eclipse.core.status.StatushCacheManager updates leading to pretty long calls to java.util.concurrent.locks.ReentrantLock.lock(). The lock is on a project level so it means there are multiple cache updates triggered for the same project at the same time. I guess this might be the parent project.

Some more questions:
1) What do you mean by build time? Does the actual build take more? Or maybe there is an additional task (Bazaar status cache refresh) run once the build is done?
2) Can you take a look at the list of processes and find CPU usage by a background bzr process?
3) I will try to set up a workspace similar to yours, any help (zipped workspace, link to similar open source projects etc.) will be appreciated :)

Changed in bzr-eclipse:
milestone: none → 1.4
Changed in bzr-eclipse:
importance: Undecided → Medium
Changed in bzr-eclipse:
milestone: 1.4 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.