purescript-signal icon indicating copy to clipboard operation
purescript-signal copied to clipboard

Unnecessary recalculation?

Open jazmit opened this issue 8 years ago • 3 comments

Hi, I'm evaluating several FRP solutions for a large-scale project and have been diving into the source code for this library. First of all, kudos for a great library, it's been working great with the prototypes I've been playing with and I'm greatly enjoying using it.

There's one point I don't understand - in the Elm implementation of FRP, signals pass an 'updated' flag through the signal graph to avoid unnecessary recalculation (see from page 28 in Czaplicki's original paper, and the original implementation of Elm's signals).

However, I can't seem to find this mechanism in the purescript-signal code - the entire signal graph seems to be updated for every input. Is there a reason for this, and would you accept a pull request to add it to the library?

jazmit avatar Apr 28 '16 13:04 jazmit

Mostly, this isn't there because nobody's really needed it yet. The PS version of Signal is very much a lazily evaluated port, in that sense. I'd definitely take a pull request.

bodil avatar May 06 '16 21:05 bodil

It would be nice to implement it!

comonoid avatar Dec 20 '16 09:12 comonoid

Pull requests still welcome.

bodil avatar Dec 20 '16 16:12 bodil