Re: finding all Java classes in a project

Svata Dedic <[email protected]> Wed, 25 Jun 2003 21:04:07 +0200
Newsgroups gmane.comp.java.netbeans.modules.projects.devel
Message-ID <[email protected]>
Sreenivasa Viswanadha wrote:

> As I mentioned on this list a few months ago, trying to calculate all 
> the information
> about types, usages etc. and keeping them in sync is much harder (in 
> terms of both
> correctness and performance) than keeping some  more higher level data 
> in a lightweight
> cache  and calculating the other details like usages on demand as needed.
> 
That only works, when you have questions for the "other details" coming 
at lower rates. Computing rarely needed stuff on-the-fly is a well-known 
practise. Once computed data can be cached and pessimistically thrown 
away as changes are detected.

However each such optimization either complicates the model 
implementation (if it is to be transparent, which is IMHO a requirement 
in order to support MDA clients), or requires special helper to populate 
the model. In regards of Java/MDR integration I think these issues were 
among the reasons your approach was not immediatelly applied after 
evaluation - it may not fit our purposes.

I believe it should be an implementation detail of the model content 
provider how often or at which point if fills the model with real data, 
provided that it is available at the return to the calling client.

-Svata