Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All structs should use same struct basis #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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