Bug 527547 - Do not necessarily build whole workspace before debug
Summary: Do not necessarily build whole workspace before debug
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2017-11-21 06:18 EST by Mickael Istria CLA
Modified: 2018-05-11 04:06 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2017-11-21 06:18:49 EST
LaunchConfiguration contains a line
  ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new SubProgressMonitor(buildMonitor, 3));

This can easily constitute a long running blocking operation. Let's assume I have a bunch of Eclipse plugins projects which build quickly, and a non-built JS project that takes age to validate, and a bunch of Maven jobs that would have to resolve depdencies.
If I do run this Launch Configuration to start an Eclipse application made only of my Eclipse plugins, I'll have to wait for ages for the whole workspace build, whereas the actual useful projects of this Launch Configuration are already built.
Comment 1 Mickael Istria CLA 2017-11-21 06:19:18 EST
Tentative for some time in 4.8 stream.
Comment 2 Mickael Istria CLA 2018-02-06 02:29:42 EST
It may be the responsibility of specific Launch Configurations to override it.
The use-case mentioned in comment 0 may be something that's more a PDE issue than a Debug one.
Comment 3 Lucas Bullen CLA 2018-02-08 14:35:42 EST
Are you sure this scenario happens? If so can you give an example. From what I found, The whole workspace only builds due to your given line if the run delegate is not an instance of ILaunchConfigurationDelegate2 or is and instance of ILaunchConfigurationDelegate2 and buildForLaunch returns false.

In your given scenario, the AbstractPDELaunchConfiguraiton will not return false as far as my tracing shows, and will only build the plugins specified in the run configuration.

Also tested this by including a small un-built java project in my workspace with other plugins, running configuration and seeing that the the java project was not built.
Comment 4 Mickael Istria CLA 2018-02-08 15:11:08 EST
Thanks for investigating Lucas. I have to admit that while I often encountered this issue, I don't have checked the details and will look more carefully next time it happens (maybe it was a JUnit Plugin tests or something like that...). I suggest we put this ticket on hold, and I'll add more details when I know better how to reproduce the symptom.