On 04 Aug 2014, at 9:31 , Nicolai Hess <nicolaihess@web.de> wrote:
2014-08-04 8:50 GMT+02:00 Henrik Johansen <henrik.s.johansen@veloxit.no>:
On 03 Aug 2014, at 5:55 , Clément Bera <bera.clement@gmail.com> wrote:
Right, current hash is bad and long to compute.
I think we should use instead BasicIndexedEyeElement >> hash ^ index hashMultiply
host identityHash and index hash may lead to many collisions... What do you think ?
I agree thereâs not much value in including host in the hash for the use case of the icon lookup cache, since those were per host anyways (iirc). Index hash will be a sequential number, I havenât checked the usage closely to see if itâll be a problem wrt. collisions, but removal at least might be slow (if thatâs ever done) due to lots of scanning needed to find the nil slot. Using hashMultiply seems a good precaution.
Cheers, Henry
And as far as I know, the icon lookup isn't needed for the inspector, as it does not show any icons at all!
Well, it still needs to figure out there is no icon to be displayed for the entry⦠In that process, it caches the result (nil), and that cache is too expensive to query later on, due to the expensive hash calculation needed to find an entry. Cheers, Henry