[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] equinox weaving w/ caching and other weavers
- From: Stephan Herrmann <stephan@xxxxxxxxxxxxxxx>
- Date: Tue, 20 Sep 2011 20:38:47 +0200
- Delivered-to: firstname.lastname@example.org
- User-agent: KMail/1.13.6 (Linux/2.6.38-11-generic-pae; KDE/4.6.2; i686; ; )
thanks for your quick response. Meanwhile I've found some time for
experiments, which raised new questions :)
> The quick solution here would be to disable the caching service for
> equinox weaving. This can be done by stopping the bundle (or avoid to
> have it auto-started). If the caching bundle is not active, no caching
> happens and everything is freshly woven at startup every time.
What would I recommend to users here?
That seems to do the trick, just wondering if there's also a simpler flag.
> The caching service was designed to work with the old equinox weaving
> implementation and is able to invalidate the cache when the weaving
> service produces a different key for the cache. If I remember this
> correctly, this also works with multiple weaving services,
I can't see how the fingerprints/keys from multiple weaving services would
That's why I thought additional API may be needed here:
> > How about an additional service like
> > String getFingerprintAddon(Bundle base)
> > Then I could register an implementation of the service that encodes
> > all OT/Equinox bundles that weave into the given base bundle,
> > I could even add the weaver version into that string,
> > and the caching service would collect all answers from all these
> > services for computing the total finger print. What do you think?
> > Should I file a bug or do you have a better idea?
For multiple weavers on top of the same caching service we'd need some
way of combining a fingerprint from different contributions, no?
I'm currently fighting a bug that happens because some classes are woven
by both weavers, and here the cached version will be used but classes woven
only for OT are not cached. Since the OT weaver generates some globally
unique IDs used for dispatching, classes re-used from the cache and freshly
woven classes will use inconsistent sets of IDs. Boom.
Next I tried to explicitly store OT-woven classes using the existing caching
service, but since OT isn't involved in generating the keys for caching,
an empty key will be used and thus these classes are NOT cached. :(
Is there a quick hack how I could tell the caching service that I do have
changes in some classes?
Otherwise, we'll just have to stick with disabling caching in this