commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CSV-184) CSVRecord toMap Method(LoadFactor for HashMap)
Date Mon, 30 May 2016 16:53:12 GMT

    [ https://issues.apache.org/jira/browse/CSV-184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15306814#comment-15306814
] 

Gary Gregory commented on CSV-184:
----------------------------------

{{toMap()}} already pre-allocates a new {{Map}} to the size of the record. 

Are you saying that you want to _add_ entries to the new Map on top of that?

A load factor of 1 is not going to help in the big picture.

What we could do is make the API {{org.apache.commons.csv.CSVRecord.putIn(M)}} public instead
of package private.

Gary

> CSVRecord toMap Method(LoadFactor for HashMap)
> ----------------------------------------------
>
>                 Key: CSV-184
>                 URL: https://issues.apache.org/jira/browse/CSV-184
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Parser
>    Affects Versions: 1.4
>            Reporter: Gaurav Agarwal
>            Priority: Minor
>
> Set loadFactor for Hashmap Object to 1(Default : 0.75) as currently it will always resize
the map when we are putting entries in it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message