You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/11/05 20:18:32 UTC
DO NOT REPLY [Bug 12481] -
Method DTMManager.newInstance causes unnecessary memory consumption
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12481>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12481
Method DTMManager.newInstance causes unnecessary memory consumption
------- Additional Comments From keshlam@us.ibm.com 2002-11-05 19:18 -------
Sorry about the delay; here are a few reactions:
SUGGESTION: An alternative approach would be to encapsulate the class retrieval
in the findFactory method -- have it return the actual factory rather than just
the factory's name -- and put the cache there. I think that would be a trifle
cleaner architecturally, given that findFactory is already a private subroutine.
ISSUE: If someone programmatically changes the property, the current code will
track that change; the proposal would break that behavior. To handle this, I
would suggest that we have findFactory always retrieve the property, check
whether the classname matches the name previously selected, and only reload if
the property has been changed.
TWEAK: Note that, either way, we don't need both the "clazz" and
"defaultFactoryClass" variables...