erlide_eclipse icon indicating copy to clipboard operation
erlide_eclipse copied to clipboard

Eclipse hangs when importing many projects at the same time

Open drapostolos opened this issue 11 years ago • 6 comments

I use the File->Import... functionality to import a bunch of existing erlang projects (107 to be exact) into my workspace: image.

After I import them, I make sure the "Refresh" is finished, then build workspace. The build hangs and never finshes. I have a bunch of the below exceptions in the erlide.log. What can be the problem? I can provide the complete erlide.log if you need it

13:48:30,382 S: (Backend.java:285) : Could not load cocos_invocation_transform 13:48:39,385 W: (BeamLoader.java:30) : timeout in code:is_sticky/1 org.erlide.runtime.rpc.RpcTimeoutException: timeout in code:is_sticky/1 at org.erlide.runtime.internal.rpc.RpcSite.getRpcResult(RpcSite.java:394) at org.erlide.runtime.internal.rpc.RpcFutureImpl.checkedGet(RpcFutureImpl.java:99) at org.erlide.runtime.internal.rpc.RpcFutureImpl.checkedGet(RpcFutureImpl.java:1) at org.erlide.runtime.internal.rpc.RpcSite.call(RpcSite.java:162) at org.erlide.runtime.internal.rpc.RpcSite.call(RpcSite.java:182) at org.erlide.runtime.internal.rpc.RpcSite.call(RpcSite.java:261) at org.erlide.runtime.api.BeamLoader.loadBeam(BeamLoader.java:20) at org.erlide.backend.internal.Backend.loadBeamsFromDir(Backend.java:282) at org.erlide.backend.internal.Backend.addProjectPath(Backend.java:244) at org.erlide.core.internal.builder.InternalBuilder.handleErlangFiles(InternalBuilder.java:207) at org.erlide.core.internal.builder.InternalBuilder.build(InternalBuilder.java:95) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381) at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:514) at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:423) at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:180) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

drapostolos avatar Dec 03 '13 13:12 drapostolos

One more thing: some of the projects seems to have its src/include folders auto discovered and some projects does not. Is there any file I need to add into the project that defines the src/include folders?

drapostolos avatar Dec 03 '13 13:12 drapostolos

The autodetection just looks for erl and hrl files, so if your include dir is empty it is not found. If it doesn't find a dir that has erlang files, then it's a bug.

Maybe I should always add "src" and "include" to the respective categories, if the dirs exist. That should help in the usual cases.

vladdu avatar Dec 03 '13 13:12 vladdu

There are src/include folders with .erl/.hrl files, but configuration looks like this: image

drapostolos avatar Dec 03 '13 13:12 drapostolos

but more importantly, why is it hanging when building? Is there anything I need to do differently? image

drapostolos avatar Dec 03 '13 13:12 drapostolos

I guess the problem was my machine (it had some problems which was solved with an upgrade and a restart).

Would it be possible to build each project in parallel, in order to speed up the build process of many projects? At least from the xterm window it looks like the projects are buildt in sequence:

image

drapostolos avatar Dec 05 '13 15:12 drapostolos

I'm relieved that the main problem wasn't something that I have to fix :-)

Eclipse builds project one at a time and the build locks the workspace so that we can't easily interfere with that. Erlide will compile in parallel, though - on all cores available except one. If you have small projects, the gain is probably small.

Soon it will be possible to build with Make and hopefully one will be able to use your parallellized build system.

vladdu avatar Dec 05 '13 16:12 vladdu