fanliwen created ODFTOOLKIT-473:

             Summary: cache alien element and attribute class to make it faster 
in OdfXMLFactory
                 Key: ODFTOOLKIT-473
             Project: ODF Toolkit
          Issue Type: Improvement
          Components: odfdom
    Affects Versions: 0.6.2-incubating
            Reporter: fanliwen
             Fix For: 0.6.2-incubating


Class.forName may not be an efficient method. and in 
line:153<code> Class, it use Class.forName to find the Element/Atrribute Class. 
The <code>classCache</code> map make it better to find the Class. But we need a 
cache for Alien Element/Atrribute Class too, otherwise it will find the same 
alien Class by Class.forName again and again. It take too much of CPU cycle.

It show you in the attachment which a snapshot by JProfiler.It call the 
Class.forName 39459 times to find the same Class.

And this is my pull request in GitHub: 



This message was sent by Atlassian JIRA

Reply via email to