-
Notifications
You must be signed in to change notification settings - Fork 87
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
Fixing memory leak #363
Fixing memory leak #363
Conversation
Ping @ocheron |
why not move to basement |
I used Would you tell me advantages of |
@kazu-yamamoto much better and complete APIs : http://hackage.haskell.org/package/basement-0.0.10/docs/Basement-Block.html and breaking from the monomorphic Word8-biased world. or even the type-level-size'd version http://hackage.haskell.org/package/basement-0.0.10/docs/Basement-Sized-Block.html |
@vincenthz How to convert |
|
Additionally, I'm wondering if the copy in Other than that it looks good. EDIT: when -> before |
as @ocheron point out |
@ocheron @vincenthz Thanks. Now |
Would you pursue this idea in another issue? We should release version 1.5.1 asap. |
I have rebased and merged this PR. |
@ocheron found that session values of
ByteString
lead memory leak. I also found that session keys (IDs) ofByteString
leak memory. 1afb213 fixes it. In my server, this reduced memory usage from 30% to 11%.b0ba6a9 changes the internal data structure from
ByteString
toShortByteString
to avoid fragmentation. This improves memory footprint from 11% to 5%. I did both experiments withdbMaxSize
= 1,000.