diff options
author | 2023-10-14 14:54:38 +0200 | |
---|---|---|
committer | 2023-10-14 14:54:38 +0200 | |
commit | 54c4c91097c50f6cedb02cb5b1aea32ae16a3421 (patch) | |
tree | 222b86f87511582c2b602c896e210d1b138220a9 /subprojects/store-query-interpreter/src | |
parent | fix(query-interpreter): register Recipes package (diff) | |
download | refinery-54c4c91097c50f6cedb02cb5b1aea32ae16a3421.tar.gz refinery-54c4c91097c50f6cedb02cb5b1aea32ae16a3421.tar.zst refinery-54c4c91097c50f6cedb02cb5b1aea32ae16a3421.zip |
refactor(interpreter-rete): recipe hashing
Use isomorphism-aware hashing to speed up RecipeRecognizer.
Due to possibly cyclic (recursive) recipes, we can't recursively turn recipes
into a canonical form. Recipes referring to already canonical (non-recurisve, or
recursive and entirely canonicalized) recipes can be hashed, while recursive
recipes in the middle of caninicalization still have to be compared more slowly
by their contents.
To keep the list of recipes compared by contents small, recipes are assigned a
hash code whenever possible.
We keep the equivalence class IDs for recipes, as there might be hash code
clashes, as well as recursive recipes that only later get assigned a hash code.
Also fixes a concurrency problem with equivalence class IDs by using an
AtomicLong.
Also reworks recipe instantiation, as now recipes might be canonicalized before
they are instantiated.
Diffstat (limited to 'subprojects/store-query-interpreter/src')
0 files changed, 0 insertions, 0 deletions