[ 
https://issues.apache.org/jira/browse/SOLR-912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786184#action_12786184
 ] 

Kay Kay commented on SOLR-912:
------------------------------

{quote}
Type safety is generally not required in NamedList. very often we use 
heterogeneous NamedList.

Creating an Entry Object per entry is memory inefficient compared to the 
existing one.

type safety is there for the users of NamedList API even now. Internally how we 
manage it is not so important i feel
{quote}

The performance numbers in here say a different story.  The heterogenous 
NamedList data structure is not intuitive w.r.t code and performs poorly 
compared to the revised one as put in here. As regarding Entry Objects being a 
memory hog - do we have some stats to back it up. Otherwise it is premature to 
call that a memory optimization. 

> org.apache.solr.common.util.NamedList - Typesafe efficient variant - 
> ModernNamedList introduced - implementing the same API as NamedList
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-912
>                 URL: https://issues.apache.org/jira/browse/SOLR-912
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>         Environment: Tomcat 6, JRE 6, Solr 1.3+ nightlies 
>            Reporter: Kay Kay
>            Priority: Minor
>         Attachments: NLProfile.java, SOLR-912.patch, SOLR-912.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> The implementation of NamedList - while being fast - is not necessarily 
> type-safe. I have implemented an additional implementation of the same - 
> ModernNamedList (a type-safe variation providing the same interface as 
> NamedList) - while preserving the semantics in terms of ordering of elements 
> and allowing null elements for key and values (keys are always Strings , 
> while values correspond to generics ). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to