[
https://issues.apache.org/jira/browse/CSV-184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15307249#comment-15307249
]
Gaurav Agarwal edited comment on CSV-184 at 5/31/16 5:55 AM:
-------------------------------------------------------------
<code>putIn</code>method takes a <code>Map</code> with initial size as size of
all values in a row with and load factor 0.75.
Inside <code>putIn</code> method, we do <code>map.put</code> for all the
values. Every time we put a value in <code>Hashmap</code>, it checks if
<code>HashMap</code> has reached it's threshold limit(capacity * loadfactor)
which will always get breached(once per row) as we are setting size as values
size and load factor 0.75.
Please let me know if I am missing something.
was (Author: gaurav.agarwal):
putIn method takes a Map with initial size as size of all values in a row with
and load factor 0.75.
Inside putIn method, we do map.put for all the values. Every time we put a
value in Hashmap, it checks if HashMap has reached it's threshold
limit(capacity * loadfactor) which will always get breached(once per row) as we
are setting size as values size and load factor 0.75.
Please let me know if I am missing something.
> 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)