[ https://issues.apache.org/jira/browse/SOLR-921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673136#action_12673136 ]
Shalin Shekhar Mangar commented on SOLR-921: -------------------------------------------- Hoss, my concerns are: # People may not even know that using the short name has a cost and they will come to accept it, unless they check the wiki. # Even if someone wants to change his schema.xml and solrconfig.xml to use FQN, I see that as a time consuming non-trivial effort. # The classloader caches the FQN vs Class. It is the negative lookups which are costly because firstly, they are not cached and secondly, Solr's retry logic is based on ClassNotFoundException being thrown. bq. I'm still in favor of just documenting that people who want to create cores quickly should use the FQNs - especially since it keeps the code simpler - but i'm not opposed to caching the String->String mappings if you guys really think that's better. I really think this is a good solution. No more mucking around with the classloader. It solves the original problem well (i.e. subsequent instantiation can use the FQN which is fast) and the code is simpler to understand too. If there are no objections, I'd like to commit this new patch tomorrow. > 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.