[ https://issues.apache.org/jira/browse/SOLR-921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673456#action_12673456 ]
Hoss Man commented on SOLR-921: ------------------------------- bq. I'd like to commit this new patch tomorrow. after sleeping on it last night I realized caching the String mappings from alias->FQN is a good idea, for the same reasons you mentioned -- but let me ask you for three favors before you commit: 1) let's add some comments in the javadocs to SolrResourceLoader.findClass noting that it does this caching, and go into some specifics ... particularly the fact that the cache is static. 2) ditto for elaborating on the SolrReesourceLoader.loadClass javadocs - the whole this.getClass().getClassLoader thing is going to be fairly non-intuitive, and right now it just refers to "base classloader" ...let's make sure future developers looking at the docs understand why it does what it does 3) let's change the warning if a cached class name triggers a ClassNotFound to be a severe error and log the stack trace, stuff that should never happen is the stuff you really want to know about if somehow it magically does. > SolrResourceLoader must cache name vs class > ------------------------------------------- > > Key: SOLR-921 > URL: https://issues.apache.org/jira/browse/SOLR-921 > Project: Solr > Issue Type: Improvement > Reporter: Noble Paul > Assignee: Shalin Shekhar Mangar > Fix For: 1.4 > > Attachments: SOLR-921.patch, SOLR-921.patch, SOLR-921.patch > > > every class that is loaded through SolrResourceLoader does a Class.forName() > and when if it is not found a ClassNotFoundExcepton is thrown > Then , it looks up with the various packages and finds the right class if the > name starts with solr. Considering the fact that we usually use this > solr.<classname> format we pay too much of a price for this. After every > lookup the result can be cached in a Map<String,Class> and can be shared > across all the cores and this Map can be stored at the CoreContainer level -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.