Bug 254922 - Updating the classpath container for a project takes sometimes very long (more than 10 minutes)
Summary: Updating the classpath container for a project takes sometimes very long (mor...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: IAM (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-11 12:46 EST by Lars Sonchocky-Helldorf CLA
Modified: 2012-01-05 13:11 EST (History)
4 users (show)

See Also:


Attachments
screenshot of the situation (189.41 KB, image/png)
2008-11-11 12:46 EST, Lars Sonchocky-Helldorf CLA
no flags Details
some sampling of the situation (152.50 KB, text/plain)
2008-11-24 14:41 EST, Lars Sonchocky-Helldorf CLA
no flags Details
Maven Artifact file handles being opened and closed (88.53 KB, image/png)
2010-02-16 05:09 EST, Brice Dutheil CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Sonchocky-Helldorf CLA 2008-11-11 12:46:06 EST
Created attachment 117571 [details]
screenshot of the situation

Build ID: M20080221-1800

Steps To Reproduce:
1. Close one or more Maven project
2. Reopen the same projects
3. Wait for the several projects to update their maven classpath classpath container

this may take up to 15 Minutes for a single project on a MacBook Pro 2.4 Ghz Core 2 Duo with already 4 GB of RAM in it! This is unbearable.


More information:
- The projects in question are depending on each other.
- No progress bar is shown, no information on what is going on in detail is given.
Comment 1 Lars Sonchocky-Helldorf CLA 2008-11-24 14:41:27 EST
Created attachment 118617 [details]
some sampling of the situation

Sadly no Java Symbols revealed since this was done in activity monitor. But maybe it helps tracking down the issue.
Comment 2 Carlos Sanchez CLA 2009-04-22 13:23:19 EDT
the performance has been inproved in the latest builds, should be way better now
Comment 3 Andrei Ivanov CLA 2009-05-05 08:05:05 EDT
The problem seems to be that IAM tries to download the sources for the dependencies.
If I have 10 projects(modules) with the same dependency that doesn't have the sources available, IAM tries to download the source 10 times.
Comment 4 Abel Muiño CLA 2009-05-05 10:47:44 EDT
With a fast internal repository, those checks are (almost) inexpensive.

As a workaround, you can avoid downloading sources form the preferences and then use "Fetch source jars" fromt the project's context menu.

Please file a separate report with the your expected behaviour when sources are not found.
Comment 5 Brice Dutheil CLA 2010-02-16 05:07:45 EST
I experience the same problem on Windows, now we are using the latests versions (Eclipse 3.5 and IAM 0.11).

We have maven projects EARs, EJB-JARs, WARs, JARs, we are not yet using the facet feature. And sometime the build of the project is really slow.

I opened ProcessExplorer (a tool of microsoft) and looked at the Eclipse process. It seems the file handles of Eclipse are being opened and then closed a lot. And the file handles are the maven artifacts in the local repository. As we have common dependencies across our projects, artifacts are being opened and closed quite a lot.

The behaviour causes stress on the hard drive, and seems to be one of the reason for this slowness.

I attached a screenshot reprensenting what I said. The tool shows red color when a handle is being closed, and green when the handle is being created.
Comment 6 Brice Dutheil CLA 2010-02-16 05:09:00 EST
Created attachment 159158 [details]
Maven Artifact file handles being opened and closed
Comment 7 Carlos Sanchez CLA 2010-05-04 12:16:27 EDT
Having many projects opened in Eclipse with IAM enabled will definitely be slow. Changes in a project need to be propagated to the other projects, that in turn need to be rebuilt,...
Can be improved? yes. How much? hard to know, we've done plenty of performance improvements already.
About the open/close file descriptors of repo artifacts, IAM doesn't do them, it's either Eclipse (when IAM references them in the Maven Classpath Container) or the Maven Embedder (when it's called from IAM for the various operations), so there's nothing we can do there, other than upgrading the embedder in the future.