[kepler-dev] Memory leak.

Kevin Ruland kruland at ku.edu
Thu Dec 22 05:03:32 PST 2005


Edward,

We have implemented a multi-threaded startup which allows multiple 
models to be parsed simultaneously.  Since parsing files from disk 
requires quite a bit of I/O, threading is a good solution to reduce 
latency.  By moving to a single parser we'd be pretty much stuck with a 
single threaded model.

Kevin

Edward A. Lee wrote:

>
> Actually, one simple solution might be to use exactly one XmlParser,
> defined as a static private variable.  I don't think it has any model
> dependent code at all... We would have to implement mutual exclusion
> to prevent multiple threads from accessing it at once, however, but
> this is probably fairly easy to do...
>
> About the getlinenumber problem you mention: is this really an issue?
> wouldn't a parse exception be dealt with right away? It could be done
> inside the mutual exclusion lock (however... some care is necessary if
> any reporting is done to the user via swing, since this will now involve
> another thread through which multiple threads accessing the parser might
> deadlock).
>
> I think it's worth a try...
>
> Edward
>



More information about the Kepler-dev mailing list