1. 10
  1.  

  2. 1

    When he was talking about caching:

    One thing that I don’t yet understand though, is how this plays out with memory usage. For example, if I’m caching from my root element, this presumably means every single view that makes it to the browser stays in memory… forever. That seems pretty bad! One easy fix is to annotate my rendering with explicit “don’t cache this” points, but everytime I find a model that requires the programmer to annotate it for performance, my heart sinks.

    was he talking about within the browser, or within the haskell code? Haskell doesn’t do any caching I don’t believe…. and if it’s the browser, then there’s nothing you can do about that anyway. Comments, his blog needs comments!

    1. 2

      He’s thinking about applying this to compiled Javascript, so he means in Haskell-in-Javascript-in-Browser :)

      1. 2

        I’m right here :) As tel mentions - this is compiled-to-Javascript Haskell with GHCJS. While Haskell doesn’t do automatic memoization (loosely speaking), with this approach we do have a problem that the root node (e.g., the <body>) tag will always be present. This means that with my approach, it always remembers how it drew all previous incarnations of the page. It’s that that I’m worried about.