glamor
glamor copied to clipboard
murmur hash function is performance consuming
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