Bug 412634 - [Workbench] Save All triggers multi-builds
Summary: [Workbench] Save All triggers multi-builds
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows Vista
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-10 01:52 EDT by Ed Willink CLA
Modified: 2019-11-25 16:34 EST (History)
5 users (show)

See Also:


Attachments
Debug log of suspect behaviour (407.55 KB, text/plain)
2013-08-23 11:24 EDT, Ed Willink CLA
no flags Details
7 file multi-build (71.59 KB, text/plain)
2013-08-23 13:25 EDT, Ed Willink CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2013-07-10 01:52:31 EDT
Kepler.

When saving many files (30), it is clear from the progress and generally incredibly slow progress, that the 30 files are not saved as a group.

Rather each is saved individually provoking many individual builds with all the consequent project updates.

Very very inefficient, and I think a regression compared to 3.x
Comment 1 Dani Megert CLA 2013-07-24 07:04:44 EDT
I tried to reproduce it, but always got only one build request so far. If you still see this, please start Eclipse with -debug <file>, where the file has the following debug options:

org.eclipse.core.resources/build/invoking=true
org.eclipse.core.resources/build/delta=true
org.eclipse.core.resources/build/needbuild=true
org.eclipse.core.resources/build/needbuildstack=true
org.eclipse.jdt.core/debug=true
org.eclipse.jdt.core/debug=true
org.eclipse.jdt.core/debug/builder=true
org.eclipse.jdt.core/debug/builder/stats= true

This will show what the builder actually does and why it gets triggered.
Comment 2 Ed Willink CLA 2013-07-26 07:44:08 EDT
Are the files you are saving subject to EGIT analysis for entry to the Staging View?
Comment 3 Ed Willink CLA 2013-07-27 05:01:50 EDT
(In reply to comment #1)
> This will show what the builder actually does and why it gets triggered.

Where? I've tried a variety of "> log.log" additions to the command line, but they variously give me a strange "No exit data" pop up or nothing to see.
Comment 4 Dani Megert CLA 2013-07-29 06:42:04 EDT
(In reply to comment #2)
> Are the files you are saving subject to EGIT analysis for entry to the
> Staging View?

No - nothing in the bug report mentioned EGit. If you can provide more details about your steps, it might help. But having the traces should be enough.


(In reply to comment #3)
> Where? I've tried a variety of "> log.log" additions to the command line,
> but they variously give me a strange "No exit data" pop up or nothing to see.

The debug info is written to the console which launches Eclipse. You need to use eclipsec.exe which connects the Eclipse console with the host console. Also, since there will be lots of logging, you want to redirect to a file by appending the following to your command line:
> log.txt 2>&1

Please also add the following two options to the options file:

org.eclipse.core.resources/debug=true
org.eclipse.core.resources/build/stacktrace=true
Comment 5 Ed Willink CLA 2013-07-30 02:11:00 EDT
(In reply to comment #4)
> The debug info is written to the console which launches Eclipse. You need to
> use eclipsec.exe which connects the Eclipse console with the host console.
> Also, since there will be lots of logging, you want to redirect to a file by
> appending the following to your command line:
> > log.txt 2>&1

Can you please provide a command line that works. With eclipsec at least a console appears, but is shows that the redirection is swallowed by the workspace!

I'm using

C:\Tools\Eclipse\4.3RC4\eclipsec.exe -debug Temp/debug.txt -data C:\Development\Buck\Workspace4.2 -vm "%JAVA_HOME%\bin\javaw.exe" > Temp/log.txt 2>&1

but the console shows me

-debug Temp/debug.txt
-data C:\Development\Buck\Workspace4.2 > Temp/log.txt 2>&1
-vm C:\Program Files\Java\jdk1.7.0_25\bin\javaw.exe
Comment 6 Dani Megert CLA 2013-07-30 04:11:51 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > The debug info is written to the console which launches Eclipse. You need to
> > use eclipsec.exe which connects the Eclipse console with the host console.
> > Also, since there will be lots of logging, you want to redirect to a file by
> > appending the following to your command line:
> > > log.txt 2>&1
> 
> Can you please provide a command line that works. With eclipsec at least a
> console appears, but is shows that the redirection is swallowed by the
> workspace!
> 
> I'm using
> 
> C:\Tools\Eclipse\4.3RC4\eclipsec.exe -debug Temp/debug.txt -data
> C:\Development\Buck\Workspace4.2 -vm "%JAVA_HOME%\bin\javaw.exe" >
> Temp/log.txt 2>&1
> 

This can't work because javaw.exe explicitly runs without console (window). You need to use java.exe.


eclipsec.exe -debug c:\eclipse\.options -data %TARGET% -vm %SDK% -vmargs %VMOptions% %* > log_tmp.txt 2>&1

works for me.
Comment 7 Dani Megert CLA 2013-08-23 06:34:23 EDT
Ed, any news on this?
Comment 8 Ed Willink CLA 2013-08-23 07:17:04 EDT
(In reply to comment #7)
> Ed, any news on this?

Redirection to a file doesn't work so I only get to see a thousand lines of console and it all scrolls past quite fast when anything relevant might be happening.

But I would have to suspect that when watched, it is much better behaved. Within my limited understanding of the messages they seem plausible.
Comment 9 Ed Willink CLA 2013-08-23 11:24:08 EDT
Created attachment 234708 [details]
Debug log of suspect behaviour

I think I got one.

The attached resulted from doing a Search during a JUnit test, with the Search needing to do some saves so it was all slow.

In the Progress View I was able to sit watching the irritating Building 50% complete while Saving Modifications was waiting. If there are modifications to save then the build should be aborting.

In the attached, searching for org.eclipse.ocl.examples.build finds a project with many builders and dependencies. org.eclipse.qvtd.build has even more dependencies.
Comment 10 Ed Willink CLA 2013-08-23 11:26:24 EDT
The suspect log was using platform Version: 4.4.0 Build id: I20130820-0800 with M1 contributions for most other things.
Comment 11 Ed Willink CLA 2013-08-23 13:25:46 EDT
Created attachment 234713 [details]
7 file multi-build

A much clearer example.

Seven Java files were dirty in org.eclipse.ocl.examples.build when I did a Save All.

The changes were addition of @Override after a change from Java 5 to 6 BREE, which had already prompted rebuilds to indicate the need for edits.
Comment 12 Dani Megert CLA 2013-08-26 10:55:37 EDT
OK, I see it now. It's not just a 4.x problem but happens when the system is slow enough, so that the auto-build requests issued by each save aren't grouped into one anymore.
Comment 13 Eclipse Genie CLA 2019-11-25 16:34:05 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.