-
Notifications
You must be signed in to change notification settings - Fork 126
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
Investigate different representation for readByteArray
#346
Comments
Related to #319. |
The source of the memory usage is in the function cryptol/src/Cryptol/REPL/Command.hs Lines 738 to 747 in 3ea5e9e
It turns the bytes from the file into an expression, consisting of a list literal full of 8-bit numeric literals. Building this expression takes a lot of memory: Using
To reduce the memory footprint of the expression, I tried building a different expression with However, the bottleneck now is the conversion from I can think of a few different approaches we might try to fix the problem:
|
The first option worked: Converting |
Perhaps due to indexing into
ByteString
, large files wind up taking a lot more memory than we'd hope.The text was updated successfully, but these errors were encountered: