|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|