As to what's possible though, it is perfectly possible for a stateful transducer that gives the appearance of operating on each directive at a time to in fact
I do understand that this isn't something that's feasible to change in OG Beancount, but I do think next generation developers should pay attention to such things! That’s a great video, thanks for sharing! Sure, “not possible” is a strong statement. And I’d absolutely encourage the next generation to explore all kinds of ideas like this. That said, it’s worth thinking about the root motivation and goals behind any change. With plugins, performance is arguably not the main concern IMHO. More important are things like: - Ease of writing plugins. The current model is extremely simple: take the ledger, transform it, return it. - A simple mental model. Plugin authors can always assume they take the whole ledger and transform it before the ledger is handed off to the next plugin - Approachability. A lot of plugins are home-cooked, and writing one is often a user’s first experience hacking on Beancount. Given that, the model should stay friendly and easy to reason about. - Ecosystem importing. Many users have years of data and a collection of existing plugins they rely on. - Performance. Important, but plugins haven’t so far been the main bottleneck. So while transducer-style ideas or streaming (eg: an indexing pass, then a transform pass) are interesting, I’d be cautious about optimizing the plugin model for performance if it complicates the authoring model or breaks existing assumptions. And in practice with a bit of profiling, you’ll find that making plugins faster wouldn’t move the needle much overall. There are serious performance issues elsewhere though, and other account modeling issues that could both benefit a huge part of the userbase as written about in the Vnext doc. And perhaps your RFC idea (great idea, BTW) could be leveraged to explore what issues to prioritize and focus on. My two cents. -- 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/05b76bea-aa1c-4ff4-a03a-8c9d7881867fn%40googlegroups.com.
