[
https://issues.apache.org/jira/browse/CSV-184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17063136#comment-17063136
]
Chen edited comment on CSV-184 at 3/20/20, 8:29 AM:
----------------------------------------------------
in some cases that the recored values is 12-16 , we init hashmap with values
sizes and default LF, will always resize the map. I think that Make public: <M
extends Map<String, String>> M putIn(final M map) is a good one.
for a reference in oracle jdk implemention the method putAll of HashMap the
init capacity would be size/loadfactor + 1 .
was (Author: guoping1):
in some cases that the recored values is 12-16 , we init hashmap with values
sizes and default LF, will always resize the map. I think that Make public: <M
extends Map<String, String>> M putIn(final M map) is a good one
> 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
(v8.3.4#803005)