Serializing parsed Expressions #495
jimburdick
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We had a request to be able to externally store Expressions so that users could create "libraries" of formulas that they could then just inject new data values in to evaluate. Due to the real-world use case working at a fairly large scale, constantly re-parsing thousands of static formulas seemed like a bad design, so it was decided we should store the Expressions' ASTs.
By having several key classes implement Serializable, we were able to store parsed Expressions in a database resulting in a performance increase across the system. We store the original formula string as well in case a breaking change happens and we need to recalculate the ASTs, allowing us to refresh the database accordingly. We haven't noticed any side effects to doing this, but were wondering if there were any reasons to avoid this, or if there was even any interest in this capability.
Beta Was this translation helpful? Give feedback.
All reactions