Re: Disabling Events

Thorsten Sturm <[email protected]> Thu, 27 Mar 2003 09:47:04 +0100
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Organization Gentleware AG
Message-ID <[email protected]>
Hi Martin,

if you are using a transaction around the loading of data for MDR, the change events get collected until the end of the transaction. Depending on the amount of data to be loaded, the number of events can be huge and therefore fill up the heap.

To give you some numbers, loading a quite big xmi file will push up the memory consumption of the JVM to about 440M  before I receive an OutOfMemoryError (with -Xmx384 as setting). Not using a transaction around loading would load the same xmi with no problem and a maximum memory consumption of about 190M. The only difference between the two tests I can see is, that in the latter one, change events get consumed right after they are created.

We need a solution to this as soon as possible (and I'm sure this would be a problem you will encounter yourself when using MDR in the new java editor with big files). Right now, we have found a work-around, but it's a dirty one slowing down loading dramatically.

What I like to see is either a way to stop the creation of certain event types or some kind of auto-flush, where events got consumed right after creation even within transactions. Of course, this has should be turned on and off on demand and for specific event types only (e.g. I want to supress change events but still need to receive transaction events).

Thorsten