Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Better performace of m2e and some doubts about the code

Two-phase refresh was meant to reduce number of times the same project has to be re-resolved. First phase is relatively inexpensive but may need to be performed multiple times if the project parent hierarchy is resolved from the workspace. Second phase is far more expensive but requires only one execution for each project. If you can suggest more efficient (on everage) approach, I am interested.
 
I do not believe ProjectBuilder.build(List<File>, ...) will improve performance as it uses the same internal logic as ProjectBuilder.build(File, ...).
 
I do agree that ProjectBuilder is the culprit here. The amount of processor, memory and i/o resources ProjectBuilder currently uses is just absurd. At the end of the day, all it needs to do is to read and correlated few xml files, which should be trivial on the modern hardware.
--
Regards,
Igor
 
 
On Mon, Jun 13, 2016, at 08:52 PM, Fabio Bohnenberger wrote:
I was looking to the m2e update project mechanism, trying to figure out where it could be more performatic.
 
Understanding better how does the process run, I could see that the update Maven project process run in few steps(refresh,update project configuration and clean), an the most "slow" is the refresh.
 
The refresh step is basically composite by:
1. Updates the projects GAV and caching MavenProjects with the MavenProjectFacade.
2. Updates of the dependencies, capabilities and lifecycle mapping of the projects
 
Both the two steps make a ProjectBuilder.build(from maven API) call, that uses a lot of disk usage in my opinion. So I wanted to know, what was the motivation to implement the refresh process in two steps. Couldn't the process just use one ProjectBuilder.build?
 
But, even that the refresh process was implemented with just one ProjectBuilder.build, when we select more projects to have the configuration updated, we will have this number of calls to the ProjectBuilder.build, that can result on a slow process for big projects with many modules.
One possible solution would be to make just one call with all the projects that should be build, using the ProjectBuilder.build( List<File> pomFiles, ... ) method.
 
I want to improve the process performace in some way, but before start coding I think that is important to understand clearly why are update maven project process implemented the way it is today. Maybe can anyone explain me better the maven project update process? Any opinions about the possible solutions I proposed?
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/m2e-dev
 

Back to the top