Thank you very much for your reply.

I have tried that for every molecule I am using:

IMolecule x ...
x = NoNotificationChemObjectBuilder.getInstance().newMolecule(libFrag);

But still profiling tells me that a lot of time is spent at method notifyChanged() and that I have nearly 500.000 (still growing) instances of the class ChemObjectChangedEvent in memory, nearly all referenced by class Atom (some by Bond).

So that does not seem to fix it.
Any ideas?

Best regards
Markus


Egon Willighagen schrieb:
On Wed, Mar 25, 2009 at 5:12 PM, Markus Hartenfeller
<hartenfel...@bioinformatik.uni-frankfurt.de> wrote:
Does anyone know how to switch off firing of ChemObjectChangeEvent?
Can anybody tell me what it is good for and whether it is necessary?

It was need for JChemPaint...

I do not explicitly use these events in my code. Do some CDK core
classes need them?

Core classes do not need them. You can see that by looking at the
dependency graph [0]... everything that depends on the interfaces
module instead of the data module, does *not* need the event model.

In many cases you do not need this event model, e.g. in descriptor
calculation where the structures do not change at all.

Profiling my project made me see that a lot of resource is spend on that
class and I am not sure whether all these events really need to be
listened to.

Use the nonotify implementation of the interfaces instead, e.g. via
the NoNotificationChemObjectBuilder.

Egon

0.http://pele.farmbio.uu.se/nightly-1.2.x/cdkdep.png


------------------------------------------------------------------------------
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to