[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ease-dev] LinkProject very slow with many projects
|
Hi all,
I have noticed that if I do the same action from an EASE module
wrapping the code in ICoreRunnable
like this:
// Code of an ease module method
public String linkBundles() {
try {
ResourcesPlugin.getWorkspace().run(
monitor -> projects().stream().forEach(this::linkProject),
new NullProgressMonitor());
} catch (CoreException e) {
return e.getMessage();
}
return "";
}
the action is also fast with many projects. But scripting makes no
sense, if I have to wrap many calls in modules. Is there any way to
have a Function as parameter in a module method, like this:
public void runInWorkspace(Function<Void, Void> f) {
try {
ResourcesPlugin.getWorkspace().run(
monitor -> f.apply(null),
new NullProgressMonitor());
} catch (CoreException e) {
}
}
Or does someone have a better idea to solve this problem?
BR,
Raphael
Am Mo., 7. Nov. 2022 um 09:18 Uhr schrieb Raphael Geissler
<raphael.geissler@xxxxxxxxx>:
>
> Hi all,
>
> I am using the function 'IProject linkProject(Object location)' in one
> of my scripts. Basically this is working. But if I am using it with
> many projects (>50) it is very slow. I assume it triggers many
> resource updates. If I import the same number of projects via the
> Eclipse Import Wizard 'Existing projects into workspace' it goes very
> fast.
>
> Does anyone of you have an idea how I can improve the performance when
> doing the import/link from EASE scripting? Disabling auto build I
> already tried, but this did not help. I assume because of some EMF
> models in some projects that are automatically generated during the
> import. Is it somehow possible to disable all triggers during the
> import and then do a full build afterwards?
>
> Thanks for your help,
>
> Raphael