This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Analyse the physical and source metamodels, trying to find: - redundancies; each one should be justified (e.g. which partially incorrect state of the user code it allowes to model) or at least identified - missing parts; according to the scope requirements, ensure there is not anything missing. - parts, which (although well modelled) may cause critical performance issues (e.g. TypedElement -> TypeDescriptor assoc for things of primitive types). This kind of check will be done several times, so this task is not to make the metamodel will be perfect in one shot, rather it should save rewriting dependent code.
[PERF] Association IsOfType -------------------- There is a huge amount of IsOfType association instances (~130,000 for JDK 1.3). Half of them are primitive types. It causes performance problem, if new instances are created/removed. Solution: `type` (in TypedElement) is now derived attribute, which is implemented. For reference types, there is created association IsOfType. Primitive types are contained directly in TypedElement. During implementation, I found another possible problem in models - using multiple inheritance can cause problem if both superclasses need derived attributes. Statistics (for java.awt and subpackages): IsOfType instances: original: ~14000 new impl.: ~6500 The similiar observation for whole jdk 1.3.1. (More than half of parameters, fields, method return values are primitive types.)
MDR team, is multiple inheritance while having derived attributes supported ? What's the suggested style of the implementation ?
Of course it is supported. You need to create an implementation class for the modeled class that has derived attributes. Moreover, if class A contains derived attributes, class B contains derived attributes and class C does not contain derived attributes but it inherits from both A and B, you need to create an implementation class for C to merge implementations of A and B. It is up to you to decide whether the implementation class for C will inherit from A and copy implementation of B or vice versa.
Anonymous classes association in physical/containment hierarchy has bad multiplicity at parentScope end. It should have 0..1.
Remove test ----------- 120 instances of TypedElement referencing to ClassDescriptor: (all in one transaction) New impl.: 4 attemps, 2,391 - 2,836 ms, average *2,532* ms. Old impl.: 4 attepms, 2,749 - 3,172 ms, average *2,864* ms. 120 instances of TypedElement referencing to PrimitiveType: (all in one transaction) New impl: 4 attemps, 2,471 - 2,744 ms, average *2,605* ms. Old impl: 4 attemps, 3,164 - 3,321 ms, average *3,220* ms. (Note: in old implementation, there had to be removed IsOfType associations too, in new impl only TypedElement were removed.)
Done in branch meta_2