Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 464527 - Slow m2e build in Mars 4.5.0 M6
Summary: Slow m2e build in Mars 4.5.0 M6
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-13 10:47 EDT by Ryan CLA
Modified: 2021-04-19 13:25 EDT (History)
6 users (show)

See Also:


Attachments
screenshot (60.17 KB, image/png)
2015-04-24 17:00 EDT, Igor Fedorenko CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan CLA 2015-04-13 10:47:25 EDT
I have been using Mars and Luna on a set of m2e/wtp/egit/java8 projects (different workspace, but same project files on disk). When using Luna the incremental build is always fast and happens in the background (unnoticeable). The same incremental build in Mars takes 3+ minutes, causes a blocking dialog to appear with build status, and is very frustrating. 

I turned on -debug for Mars and found the time is consumed in the MavenBuilder. While I haven't double checked it seems this only occurs on a project that has 6k resources. Although both Luna and Mars build output say they are processing 6k resources, the Luna build finishes in seconds. 

What are the next steps for providing the information needed to solve the problem? How can I help?
Comment 1 Igor Fedorenko CLA 2015-04-13 11:46:39 EDT
Newer version of maven embedded in m2e requires more memory in some scenarios (a known Maven problem/regression). See if eclipse jvm heap usage is running close to -Xmx and increase max heap size if it is. Beyond that, we'll need a standalone example project and exact steps we can use to reproduce the problem. Ideally, the test project should work with m2e installed on eclipse sdk without any additional components. Specifically, if m2e-wtp/wtp are required to reproduce the problem I will move the bug to m2e-wtp for further investigation. If you are interested (or prefer) to profile m2e yourself, I will be happy to provide pointers on m2e-dev mailing list.
Comment 2 Ryan CLA 2015-04-13 13:53:09 EDT
Just tried it with -Xmx2048 in Eclipse.ini. This did not improve the performance and I noticed the heap never really gets beyond 300-400m. I also had the "Progress" view open and noticed the build went through every item in /src/main/resources and listed "Refresh: /src/main/sources/abc/xyz.ext" for about 1 second per file. 

Might be easiest for me to do a profile and if the root cause is not immediately obvious then I can work on a standalone reproduction project.
Comment 3 Ryan CLA 2015-04-24 16:54:14 EDT
I am having difficulties getting a profile going connecting visualvm straight to Eclipse. Any suggestions?
Comment 4 Igor Fedorenko CLA 2015-04-24 17:00:06 EDT
Created attachment 252753 [details]
screenshot

What os and java do you use? I've had no problems profiling eclipse when running oracle/sun vms.
Comment 5 Ryan CLA 2015-04-24 17:15:18 EDT
oracle jdk 1.8 on OSX... it may eventually complete but so far the initial instrumentation from visualvm is crashing at worst and hanging at best. Possibly related to not being able to detect what class to start profiling from (visualvm can't auto detect). I am trying org.eclipse.m2e.** and see if that helps it get going (was trying ** before)
Comment 6 Fedor Ilinykh CLA 2016-04-04 07:11:53 EDT
I can confirm the problem.

Incremental compilation after any code change:

Luna: 1-2seconds or less.
Mars: 45minutes
Neon M3: 40minutes

Platform: OSX, Oracle JDK8

Project has 3 packages with huge number of classes (mostly generated code). Lambdas are actively used.

Because of this issue I forced to use IDEA and I really hate it.
Comment 7 think gem CLA 2017-03-30 02:03:03 EDT
(In reply to Fedor Ilinykh from comment #6)
> I can confirm the problem.
> 
> Incremental compilation after any code change:
> 
> Luna: 1-2seconds or less.
> Mars: 45minutes
> Neon M3: 40minutes
> 
> Platform: OSX, Oracle JDK8
> 
> Project has 3 packages with huge number of classes (mostly generated code).
> Lambdas are actively used.
> 
> Because of this issue I forced to use IDEA and I really hate it.

I also encountered this problem, do you solve? thank you.
Comment 8 think gem CLA 2017-03-30 21:26:19 EDT
(In reply to think gem from comment #7)
> (In reply to Fedor Ilinykh from comment #6)
> > I can confirm the problem.
> > 
> > Incremental compilation after any code change:
> > 
> > Luna: 1-2seconds or less.
> > Mars: 45minutes
> > Neon M3: 40minutes
> > 
> > Platform: OSX, Oracle JDK8
> > 
> > Project has 3 packages with huge number of classes (mostly generated code).
> > Lambdas are actively used.
> > 
> > Because of this issue I forced to use IDEA and I really hate it.
> 
> I also encountered this problem, do you solve? thank you.

I have found the reason, because a compilation phase yui a plug-in.But there is no this kind of circumstance Luna. thank you.
Comment 9 Eclipse Genie CLA 2018-03-31 05:24:09 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 10 Denis Roy CLA 2021-04-19 13:25:15 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/