You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2016/05/30 16:53:12 UTC
[jira] [Commented] (CSV-184) CSVRecord toMap Method(LoadFactor for
HashMap)
[ 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)