You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Noble Paul (JIRA)" <ji...@apache.org> on 2009/02/11 18:01:09 UTC

[jira] Updated: (SOLR-921) SolrResourceLoader must cache name vs class

     [ https://issues.apache.org/jira/browse/SOLR-921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Noble Paul updated SOLR-921:
----------------------------

    Attachment: SOLR-921.patch

afterall , we may not need to cache the classes themselves. Loading classes with FQN is as fast as a HashMap lookup after the class is loaded . So we can just cache short-name -> FQN and we are still fine.

> 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.