> Still some significant amount of time is spent in the original feature > creation and we should have a way to avoid that. I'm having some > real problems extracting useful profiles (YourKit is giving me grief) > but I think we should do the following: > * have simplefeatureimpl use an Object[] as a backend for its data > avoiding the expensive data structure allocations I could go for this. So i guess we would break out SimpleFeatureImpl from FeatureImpl and the rest of the model? Then we could also make SimpleFeatureBuilder must faster as it just has maintain the object array and not worry about building attributes when the user adds the raw objects into the builder.
So... the downside i see is that all the logic for creating Attribute instances from Objects will now have to go into SimpleFeatureImpl. I kind of don't like this as I like the design of keeping the feature model implementation as "dumb" as possible. But if we get the performance benefit then i would be for it. Would have to see the patches first though :). > * have a fast, validation free, feature creation path for the cases > where we do know attributes are good. For example, how do you > make an invalid feature out of a database table, given the > feature type has been created by reflecting that very table > structure? This taps into the validation vs no validation debate... but I agree. I think we should turn off validation by default, and have some convenience method to explicitly invoke validation. > > I also noticed that both descriptor and attributes have a userdata > field that gets allocated with an HashMap on each creation. Since > both of them are never used in current code, avoiding that allocation > provides some benefit. > I changed the code to leave the hashmap null, and the getters > so that if the field is null then Collections.emptyMap is > returned. Sounds good to me. > > Cheers > Andrea > > !DSPAM:4007,475ceef8179047180515871! > -- Justin Deoliveira The Open Planning Project http://topp.openplans.org ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
