actualbudget / actualbudget/actual
[Bug]: Balance calculation for rule application making schedule preview transactions slow
- Lenguaje dominante
- TypeScript
- Estrellas
- 28.7k
- Forks
- 3k
- Merge medio
- 2 d 11 h
- PR fusionados (30 d)
- 65
Descripción
### What happened?
I found that while debugging an extremely large budget file, preview transactions were taking a long time to load (~5s after the transactions loaded). Looks like this is because rules are run on each transaction (side note, our current rule application method is poorly optimised for running rules on large transaction sets), and for each transaction, the account balance is calculated for use in rule formulae or rule action templating.
We should really find a way around this, balance calculation is expensive, especially in large accounts (these were all >3000 transactions), and if it's removed from the rules application, the TTL comes down from ~5s to >100ms.
Not sure how to label this, so it's a bug until someone disagrees :)
### How can we reproduce the issue?
x
### Where are you hosting Actual?
None
### What browsers are you seeing the problem on?
_No response_
### Operating System
None
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.