on Dec 11th, 2010Populate Target Definitions Faster

Cut the download cord and populate your target platforms faster with PDE 3.7M4.

Software Site (p2 repository) based PDE Target Platforms are great. Point at a repo, pick some features, click and everything you need gets downloaded and cached locally.  With some recent improvements you can easily include sourceupdate and export these targets. What could be better?

How about downloading the content faster?  How about not downloading at all?!

I dunno about you but I have some 50 or so workspaces on my machine.  Different Eclipse projects, customer projects, company projects, hobby projects, book projects, …  Pretty much all of them use p2-based target platforms. I don’t mind that each workspace has its own cache (aka bundle pool) of the target bundles — disk space is cheap.  I do mind that every time I make a new workspace the target bundles are downloaded again.  They are already on my disk in a folder right next door!

Turns out that with some very minor tweaks in the PDE code I was able to have the downloading step consider additional artifact repositories. Once that was enabled, I added in the bundle pool for the current running Eclipse IDE as well as the PDE target bundle pool for all known “recently used” workspaces. The net effect is that you pick features from one metadata repo and the content, if already local, is just copied.  No downloading.  Of course, new content is still downloaded as needed.

We are looking at exposing some preferences to allow additional artifact repositories to be listed.  Makes sense, just need to put a UI on it.  Can you think of additional improvements?

Watch your network access next time you add content to your target platform.  You should be pleasantly surprised.

Sidenote: People have suggested that PDE manage just one artifact repository/bundle pool for all target definitions for all workspaces. This would save disk space for sure but introduces some additional complexity in managing concurrent repo access as well as garbage collection. It would be great but for now, this is the next best thing.

3 Responses to “Populate Target Definitions Faster”

  1. Hendy Irawanon 11 Dec 2010 at 7:55 pm

    Please include this on p2/PDE !

    Also added to: http://wiki.eclipse.org/PDE/Target_Definitions

    Maven has a single local repo per user and I have no problems with it.

  2. Aaron Digullaon 30 Dec 2010 at 7:32 am

    Makes me wonder: Why do you keep the copy per workspace anyway? The downloaded bundles should be stable and serving them from one central space for all workspaces and copies of Eclipse (I have several installed) should be much less hazzle for anyone.

    Just like Maven: Ask the user for a path or put all downloads into ${user.home}/.p2

    Works automatic and without anyone having to notice.

  3. jeffon 07 Jan 2011 at 1:34 pm

    Yup. There are a few technical issues with concurrent access to the simple repo structure used for the bundle pool. It was not intended to be used for multiple independent processed modifying the same repo. There is a separate discussion about managing the pool if it was central etc but it would be good to at least have the option.

Comments RSS

Leave a Reply