Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-03-19 22:12:54 +0000
committerJeff Johnston2018-03-20 01:50:31 +0000
commit60affd8b9f98c07b0dac9176964250b67029ef70 (patch)
treea9784d0471f8e2505649d052b845785a1dec0fad /build/org.eclipse.cdt.meson.core
parentf388f97fffe39ad21fbc39c6441cb66dda40328a (diff)
downloadorg.eclipse.cdt-60affd8b9f98c07b0dac9176964250b67029ef70.tar.gz
org.eclipse.cdt-60affd8b9f98c07b0dac9176964250b67029ef70.tar.xz
org.eclipse.cdt-60affd8b9f98c07b0dac9176964250b67029ef70.zip
Bug 532420 - Make Container Core Build indexing more efficient
- add new ICBuildConfiguration2 to keep API checks happy - remove refreshScannerInfo method from ICBuildConfiguration and put it in ICBuildConfiguration2 - make CBuildConfiguration implement ICBuildConfiguration2 - update ContainerPropertyVolumesModel to use new Docker plug-ins using docker-client 8.9.2. - fix MesonBuildConfiguration to use a job for each compile line being processed, then wait until all jobs are done before causing an reindex to occur (this will maximize parallelism when building in Containers) - fix ContainerCommandLauncherFactory to save the project so we can exclude project directories when copying header files using the new Docker Tooling interfaces - fix CoreBuildLaunchBarTracker to use ICBuildConfiguration2 interface to make the call to refreshScannerInfo Change-Id: I2138f5111614e7821e46c22731397a01035eac0a
Diffstat (limited to 'build/org.eclipse.cdt.meson.core')
-rw-r--r--build/org.eclipse.cdt.meson.core/src/org/eclipse/cdt/internal/meson/core/MesonBuildConfiguration.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/build/org.eclipse.cdt.meson.core/src/org/eclipse/cdt/internal/meson/core/MesonBuildConfiguration.java b/build/org.eclipse.cdt.meson.core/src/org/eclipse/cdt/internal/meson/core/MesonBuildConfiguration.java
index 23a6496ca9..aa2de1ca0f 100644
--- a/build/org.eclipse.cdt.meson.core/src/org/eclipse/cdt/internal/meson/core/MesonBuildConfiguration.java
+++ b/build/org.eclipse.cdt.meson.core/src/org/eclipse/cdt/internal/meson/core/MesonBuildConfiguration.java
@@ -336,6 +336,7 @@ public class MesonBuildConfiguration extends CBuildConfiguration {
IProject project = getProject();
Path commandsFile = getBuildDirectory().resolve("compile_commands.json"); //$NON-NLS-1$
if (Files.exists(commandsFile)) {
+ List<Job> jobsList = new ArrayList<>();
monitor.setTaskName(Messages.MesonBuildConfiguration_ProcCompJson);
try (FileReader reader = new FileReader(commandsFile.toFile())) {
Gson gson = new Gson();
@@ -345,7 +346,14 @@ public class MesonBuildConfiguration extends CBuildConfiguration {
dedupedCmds.put(command.getFile(), command);
}
for (CompileCommand command : dedupedCmds.values()) {
- processLine(command.getCommand());
+ processLine(command.getCommand(), jobsList);
+ }
+ for (Job j : jobsList) {
+ try {
+ j.join();
+ } catch (InterruptedException e) {
+ // ignore
+ }
}
shutdown();
} catch (IOException e) {

Back to the top