Drop owee dependency and work on strings #2
Loading…
Reference in a new issue
No description provided.
Delete branch "no-owee"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1, #2.
This has the downside that the whole binary has to reside in memory as a string. I think it will be interesting to look into using cachet here.
WIP: Drop owee dependency and work on stringsto Drop owee dependency and work on stringsThis now uses cachet and doesn't depend on cstruct and uses cachet instead. This has a lot of benefits, but to me it seems much harder to use if the whole binary is in memory. I will need to experiment with cachet for that use case.
The following snippet works for strings. In my test this performs fine. There were only 3 cache misses so not many bigarrays are created.
Changes here breaks on 32 bit platforms (if that ever worked to begin with).
it should be noted that bigarrays are not really counted in this case. Allocated from
Unix.map_file
, this is pure virtual memory :) - furthermore, you could map a 64 GB file and there'd be no impact in terms of memory used by the program.sorry this was in the context where the "file" is not a file and is a string in memory. In albatross and mollymawk we expect an API that takes a string. In the case of mollymawk the string is the binary as in the POST request by the browser client.
I think this will likely change at some point when we perhaps stream the binary to a temporary file. Then cachet will be more useful :) in the meantime we need to be able to process strings.
bba9fc5251
to9e0ecbef19