[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2t] Re: Galileo performance twice as slow?

Jos,

how do you start your generator?

You are right, the third param was removed after the last code review.
Somewhere in the context of your application, you'll need to configure the ResourceLoaderFactory to use the caching resource loader instead of the default implemenation. Doing this in the activator of your plugin should work - at least in theory. Do you launch the generator in a job? This would spawn an own thread and thereby ignore the current thread resource loader. This raises the initial question: How do you start your generator?


Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 18.08.09 14:44, schrieb Jos Warmer:
Sebastian,

I assume you refer to this piece of code:

CachingResourceLoaderImpl crl = new CachingResourceLoaderImpl(new
OsgiResourceLoader(
Activator.PLUGIN_ID, // a plugin that has declared the required deps
MWEPlugin.INSTANCE.getBaseURL(), RunWorkflows.class.getClassLoader()));
// a class from this plugin
ResourceLoaderFactory.setCurrentThreadResourceLoader(crl);

I am not sure where I should put this code. I tried to put it into an
Activator class . First of all, there is no three-argument constructor
for OsgiResourceLoader, so I removed the second argument.

However, it does not seem to work. At least I see no difference in
performance. Can you explain where to put this code?

Jos