Skip to content

Conversation

@RokLenarcic
Copy link

This fixes the problem where each row uses a new struct basis object which is not correct. It works but it wastes time and memory. The basis objects are retained with the maps which can be seen here, using clj-memory-meter:

Before this patch:

(mm/measure
  (slurp-csv "/Users/roklenarcic/Downloads/analysis20230215064100/age.csv"
             :mappify true
             :structs true))
=> "6.5 MiB"
(mm/measure
  (slurp-csv "/Users/roklenarcic/Downloads/analysis20230215064100/age.csv"
             :mappify true
             :structs false))
=> "4.8 MiB"

After this patch:

(mm/measure
  (slurp-csv "/Users/roklenarcic/.....csv"
             :mappify true
             :structs true))
=> "4.8 MiB"
(mm/measure
  (slurp-csv "/Users/roklenarcic/.....csv"
             :mappify true
             :structs false))
=> "4.8 MiB"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant