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

Reduce allocated memory #14

Open
rob-luke opened this issue Mar 27, 2016 · 1 comment
Open

Reduce allocated memory #14

rob-luke opened this issue Mar 27, 2016 · 1 comment

Comments

@rob-luke
Copy link
Collaborator

Reading a 262 mb file allocates 916.65 mb of memory. Allocating over 3 times more memory than the file size seems a lot. But looking at your code I see no obvious inefficiencies. Do you think the allocated memory could be reduced?

@sam81
Copy link
Owner

sam81 commented Mar 27, 2016

Partly the reason may be that the BDF files are stored with a 24-bits depth, while when the data are imported in Julia they are represented as 32-bit floats. However, I guess that can't explain a 3x difference. Maybe using a (memory-mapped file)[https://en.wikipedia.org/wiki/Memory-mapped_file] could be a solution to this issue. I've never tried this, so I'm not sure how it works, but it may be interesting to investigate this approach.

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

No branches or pull requests

2 participants