DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41044>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41044 ------- Additional Comments From [EMAIL PROTECTED] 2006-11-27 10:27 ------- Richard, Nice job, so far! Been pondering a bit more about this myself, and thought up a few things to keep in mind in the process: 1) In some cases a Maker uses instance methods of the FONode for which the property is being created. Even the most trivial FONode.getNameId() can already result in a slightly different Property instance being created. 2) Of specific interest are percentages and other relative values. Their specified value --say 70%-- may be the same, but the underlying LengthBase has an FObj instance member that comes into play when resolving that percentage during layout. A Property instance for a percentage value created for one FObj can currently not be re-used for another FObj. Percentages need to be excluded, I think, and should always trigger the creation of new instances, unless there's also a design-change making it possible to reset the FObj member of a single LengthBase. 3) Also of interest: ToBeImplementedProperty. We definitely should check whether we really need different instances, or if one instance would be enough. Nothing is done with them anyway. At the very least: one instance per distinct initial value should suffice. 4) A LengthProperty instance for a property with a specified absolute value of "10pt" could be re-used for all <length> properties (font-size, line-height, ...). This is what your patch currently demonstrates for the Enums. Again, a very nice proof-of-concept! Just one tiny question/remark: would it make sense IYO to move the propertyCache to a central location, say a PropertyPool, sort of a central map structured by the property types, instead of keeping these caches local to the types themselves? Provide two access points --get() and put()-- and keep all the other related logic encapsulated in there... -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
