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
using strict language extensions. #752
Conversation
I have a (perhaps irrational) concern about these language extensions, since they non-locally modify the behavior of code, making it confusing to read a source file. I'm not 100% opposed though. For |
I understand your psychological barrier. :-) But honestly, I don't want to spend my time to seek the source of memory leak due to lazy evaluation anymore. :( For experience of 10-years network programming in Haskell, I don't see any benefits of lazy evaluation except:
As SPJ described, lazyness is good test cases for purity. But it matters for Haskell compiler developers, not for users. For months, I have been using https://gitlab.haskell.org/ghc/ghc/issues/16810 For soft-landing, it's OK for me to leave What do you think? |
I'm definitely on board with the idea that laziness is generally a problem, I'm just worried about creating confusing code. But I'll defer to your judgement here: go for the release, but please leave |
I think @snoyberg already knows this, but I've started kicking around my code like @kazu-yamamoto where I use Strict/StrictData in projects. It's been fine except for one annoying pattern with |
@snoyberg Thank you for understanding. I'm now tackling the space leak of my HTTP server. |
Tips: I misunderstood that the heap profile file is generated after a Haskell program (with Another issue: |
I have excluded |
New versions of warp, warp-tls and auto-update have been released. |
This change enables StrictData to prevent space leaks, as Kazu Yamamoto explained in yesodweb/wai#752 (comment) To do that, this change removes: - `fromMaybe (error "xx is needed")` lazy trick - the search cli which is not useful
This patch uses
Strict
andStrictData
in wai, warp, warp-tls and auto-update.I confirmed that this improves memory footprint.
@snoyberg Would you please explain why laziness is necessary for
requestBody
?