Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » disconnect cache or performance enhancement on update
disconnect cache or performance enhancement on update [message #100686] Tue, 30 October 2007 16:58 Go to next message
Eclipse User
Originally posted by: laurent.legoff.geensys.com

Hi,

I was actually developping a bundle in eclipse that can manage some
"Dynamic bundle". This "Dynamic bundle" are in fact Plugin Project in my
workspace that I install and start in current framework...

My problem is that these "Dynamics bundles" are often reloaded and this is
a performance problem. I view in debug mode that the osgi cache take a
long time to copy / remove files in the cache. I would like to disconnect
the cache for these specifics dynamics bundles.

Anyone have an idea of what can I do ?

Thanks for your help

Laurent
Re: disconnect cache or performance enhancement on update [message #101087 is a reply to message #100686] Mon, 05 November 2007 17:22 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas Watson
Messages: 427
Registered: July 2009
Senior Member
How are you installing the bundle? Are you using a file URL or a
FileInputStream? If so I can see why it is a performance problem. This
forces the framework to copy the complete project contents into its own
cache.

When launching eclipse from eclipse (i.e. self-hosting) we use what are
called reference URLs. This allows the framework to load and use the
content of the bundle from the location specified as-is without copying
the content into the framework cache. Something like this can be used:

URL bundleReference =
new URL("reference:file:<path to workspace project>");
BundleContest context = getContext();
// just use a String URL and let the framework use the URL string
// as the location
context.installBundle(bundleReference.toExternalForm());
// or pick your own location and open the URL stream first
context.installBundle(
"some dynamic location", bundleReference.openStream());


Currently the reference protocal only supports "referring" to another
file: URL.

HTH

Tom.
Re: disconnect cache or performance enhancement on update [message #104560 is a reply to message #101087] Wed, 30 January 2008 12:01 Go to previous message
Eclipse User
Originally posted by: laurent.legoff.geensy.com

Hi Tom,

I effectively use "reference:file" to load bundle without caching all
this one.
Thanks Laurent.

Tom Watson a écrit :
> How are you installing the bundle? Are you using a file URL or a
> FileInputStream? If so I can see why it is a performance problem. This
> forces the framework to copy the complete project contents into its own
> cache.
>
> When launching eclipse from eclipse (i.e. self-hosting) we use what are
> called reference URLs. This allows the framework to load and use the
> content of the bundle from the location specified as-is without copying
> the content into the framework cache. Something like this can be used:
>
> URL bundleReference =
> new URL("reference:file:<path to workspace project>");
> BundleContest context = getContext();
> // just use a String URL and let the framework use the URL string
> // as the location
> context.installBundle(bundleReference.toExternalForm());
> // or pick your own location and open the URL stream first
> context.installBundle(
> "some dynamic location", bundleReference.openStream());
>
>
> Currently the reference protocal only supports "referring" to another
> file: URL.
>
> HTH
>
> Tom.
Previous Topic:please help: can't get native code to work
Next Topic:error with MacOs for org.eclipse.core.runtime.CoreException: Plug-in
Goto Forum:
  


Current Time: Tue Sep 23 18:27:44 GMT 2014

Powered by FUDForum. Page generated in 0.02017 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software