I've been slaving away at performance for my game and odoyle has also fallen victim. My fork (https://github.com/nivekuil/odoyle-rules/) has some substantial changes:
:then-finally now means "on retract". It gets passed the old match. This is useful for things like cleanup effects, e.g.
:then's match now has metadata on it, including the id+attrs and the old match. The former is useful as an aggregation key, the latter for diffing.
fire-rules can now :transform the session. I mentioned in https://github.com/oakes/odoyle-rules/issues/29#issuecomment-1814189904 that I think it's necessary for parallelism, and also Clara batches inserts like this for performance. Not sure how much it helps already but it seems better than the mutable-session approach in a number of ways.
some other small optimizations, reduce-kv instead of (reduce (keys)), using transients
I plan on maintaining a fork indefinitely, but before I break even more stuff if you want any of this upstreamed I'm happy to help. I'm really impressed with how good odoyle is at a fraction of Clara's code (which itself is tiny compared to traditional rule engines, I'm sure)
I've been slaving away at performance for my game and odoyle has also fallen victim. My fork (https://github.com/nivekuil/odoyle-rules/) has some substantial changes:
:then-finally
now means "on retract". It gets passed the old match. This is useful for things like cleanup effects, e.g.:then
's match now has metadata on it, including theid+attrs
and the old match. The former is useful as an aggregation key, the latter for diffing.:transform
the session. I mentioned in https://github.com/oakes/odoyle-rules/issues/29#issuecomment-1814189904 that I think it's necessary for parallelism, and also Clara batches inserts like this for performance. Not sure how much it helps already but it seems better than the mutable-session approach in a number of ways.I plan on maintaining a fork indefinitely, but before I break even more stuff if you want any of this upstreamed I'm happy to help. I'm really impressed with how good odoyle is at a fraction of Clara's code (which itself is tiny compared to traditional rule engines, I'm sure)