It's a bit difficult because some plugins process the entire thing and
insert directives after seeing the entirety of the stream before making
modifications. In other words it's not "online".  I think it's possible for
some subset of plugins though.

I don't think you'll get a lot of performance benefit from that. Do some
profiling. Maybe finding a way to reuse balance accumulation across plugin
runs might help, but honestly I would let profiling guide us.



On Wed, Mar 4, 2026 at 11:09 PM 'Simon Guest' via Beancount <
[email protected]> wrote:

> Having been designing a plugins system for limabean using Clojure
> transducers <https://clojure.org/reference/transducers>, I happened to
> notice a very different implementation for plugins in OG Beancount.
>
> Clojure transducers compose, so if you have a number of plugins, the
> limabean plugin framework loops once over all the directives, passing each
> directive through the whole chain of plugins.
>
> I noticed that with the way plugins have been implemented in OG Beancount,
> each plugin iterates over the entire list of directives. And then the next
> plugin does the same, and so on.  I wonder if there is the potential here
> for iterating just once, and passing each directive through the chain of
> plugins?
>
> Just to be clear, I'm only throwing this idea out.  I won't be working on
> this! 😅
>
> cheers,
> Simon
>
> PS. Upon reflection, it may not be very low hanging!  But worth
> considering for vNext, surely.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion visit
> https://groups.google.com/d/msgid/beancount/CAFhGSbuY8fz7ETo2%3DCJguqYsnhZC0_Um9xoF-8XPh9hAzeARpg%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CAFhGSbuY8fz7ETo2%3DCJguqYsnhZC0_Um9xoF-8XPh9hAzeARpg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPQvip3AJ6RMemWGH%3D%3D2ZbfT5NcxQOXz_31PJfp50xj5Q%40mail.gmail.com.

Reply via email to