Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] [perf] Resource.refreshLocal

I think what you see is a result of a workaround for bug 368376 [1].
Because of this bug m2e needs to refresh parent resource, which widens
refresh scope and I guess can be quite expansive for directories with
many files.

Resources plugin can probably be optimized some more too. The API used
to bridge maven plugins and eclipse workspace provides two basic
mechanisms to keep workspace and filesystem in sync. Maven plugin can
request OutputStream that writes directory to a workspace resource,
which does not require a refresh. Alternatively, maven plugin can tell
m2e to refresh files that were updated on filesystem. I haven't checked,
but looks like resources plugin uses the latter.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=368376

--
Regards,
Igor

On 11/14/2013, 14:11, Martin Kočí wrote:
Hi,

I'm doing some profiling of eclipse build. The original thread can be
found here:
http://dev.eclipse.org/mhonarc/lists/platform-core-dev/msg01706.html and
here : http://dev.eclipse.org/mhonarc/lists/platform-core-dev/msg01710.html

Here are some details about the m2e/refresh problem mentioned in the
second thread. You can reproduce the problem with following steps:

1) In eclipse (kepler SR1) with m2e (I use 1.5.0M3) New -> Maven Project
-> (Skip archetype seleciton) .. etc
2) In the project : create one resource in src/main/resources (test.txt)
3) In eclipse : Project -> Clean (build the project)

The result of the build is 1 invocation of
org.eclipse.core.internal.resources.Resource.refreshLocal(int,
IProgressMonitor)

4) now: delete in .classpath all  excluding="**"
5) delete org.eclipse.m2e.core.maven2Builder in .project or mark
maven-resource-plugin as </ignore> in lifecycle metadata
6) build the projekt again with Project -> Clean (build the project)
(NOT with Maven -> Update Project Configuration)

The result of the build is O invocations of
org.eclipse.core.internal.resources.Resource.refreshLocal(int,
IProgressMonitor)

The difference is, that in the first case,  allocates  the method
org.eclipse.core.internal.resources.Resource.refreshLocal additional 612
objects

I'll send details later, but the invocation of Resource.refreshLocal
comes from ResourceMojo


Regards,

Martin


_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev



Back to the top