commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gaurav Agarwal (JIRA)" <>
Subject [jira] [Commented] (CSV-184) CSVRecord toMap Method(LoadFactor for HashMap)
Date Tue, 31 May 2016 05:55:12 GMT


Gaurav Agarwal commented on CSV-184:

putIn method takes a Map with initial size as size of all values in a row with and load factor

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:
>             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

View raw message