glamor icon indicating copy to clipboard operation
glamor copied to clipboard

murmur hash function is performance consuming

Open blackswanny opened this issue 7 years ago • 0 comments

In our project we figured out that glamor code takes the most time. After investigation we found that it is due to hash function. Simple performance test and compare with simplier function (like below) shown significant reduce in glamor processing time. We found no callouts or duplicates with that simple function. We have hundreds of styles. https://github.com/darkskyapp/string-hash/blob/master/index.js

Also in scope of this issue could you think about replace of JSON.stringify to some more simple thing, as it is also consuming a lot.

(0, _hash2.default)(str).toString(36) vs hash function above Total Render Function Time: 2530.08ms vs Total Render Function Time: 600.26ms

blackswanny avatar Nov 21 '17 23:11 blackswanny