I recently setup an elm-css benchmark based on code from our production code base, and after profiling said benchmark, I discovered that string concatination and hashing is where elm-css spends most of its time.
This PR improves the performance of elm-css by reducing the amount of text that has to be hashed in order to generate a classname.
From my testing, this improves performance by 10-15% depending on the browser being run.
I recently setup an elm-css benchmark based on code from our production code base, and after profiling said benchmark, I discovered that string concatination and hashing is where elm-css spends most of its time.
This PR improves the performance of elm-css by reducing the amount of text that has to be hashed in order to generate a classname.
From my testing, this improves performance by 10-15% depending on the browser being run.
The benchmark I ran can be found here: https://github.com/robinheghan/elm-css-playground
Check out the
reduce-hash-content
branch to test this particular optimization in isolation.When combined with the changes in #544 , I see performance improvements in the 30-40% range, depending on the browser being run.