<div dir="ltr">I'm working on a web app that loads a file, tweaks it a bit, then downloads the results. I'd like for it to use the minimal amount of memory possible, just as good practice. Especially since the tweaking all happens in the first K or so of the file, and the rest of it is passed through untouched.<div>
<br></div><div>The current version uses a conduit that just reads the data to a sinkLbs to get a lazy bytestring, which is then processed.</div><div><br></div><div>I think this will have the desired behavior (after all, the bytestring is lazy), but have this itch that says I should be doing the processing in the conduit.</div>
<div><br></div><div>Someone want to tell me if I correctly understand things and the itch is just leftover imperative thinking, or the itch is right and I need to fix the code?</div><div><br></div><div>If you're intersted, you can find the code at</div>
<div><a href="https://www.fpcomplete.com/user/mwm/xyzifiy">https://www.fpcomplete.com/user/mwm/xyzifiy</a><br></div></div>