Discovering of StoreableHooks is not cached
|Reported by:||mkommend||Owned by:||mkommend|
There exists a code in the StorableSerializer for discovering the StoreableHooks per type and after discovering this information is stored in a dictionary hookCache to allow its reuse when the type is encountered again and thus skipping the reflection code.
The problem is that the key for this dictionary is the class HookDesignator, which does not overload equals and getHashcode properly (hence a reference comparison is performed) and therefore an already discovered hook is never detected in the dictionary and the reflection code is invoked everytime.
An easy solution for this issue would be to derive HookDesignator from Tuple<Type,HookType>.
Change History (6)
comment:4 Changed 3 years ago by epitzer
- Owner changed from epitzer to mkommend
- Status changed from accepted to reviewing