Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ease-dev] LinkProject very slow with many projects

Hi Raphael,

It has been many years since I was active on EASE, but your question caught my attention.

Can you try to implement a module method like executeUI which calls back to a function in the script? e.g. https://github.com/jonahgraham/EASE-Python-Examples/blob/master/Solutions/Extend%20Solutions/find_replace.py

Jonah



~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Mon, 7 Nov 2022 at 07:45, Raphael Geissler <raphael.geissler@xxxxxxxxx> wrote:
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
_______________________________________________
ease-dev mailing list
ease-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/ease-dev

Back to the top