k0kubun / hamlit

High Performance Haml Implementation
https://rubygems.org/gems/hamlit
Other
980 stars 60 forks source link

Performance degradation when going from haml 5.2 -> haml 6 (hamlit) on ruby 2.6.8 and Apple M2? #194

Closed jontebol closed 1 year ago

jontebol commented 1 year ago

Don't know if this is an issue with my local env or what, but I tried upgrading to haml 6 to get a nice performance bump, but instead things got a little bit slower. Not much, but after having refreshed a bunch of pages in our app a bunch of times, it seems something like 10% slower. I checked the architecture of haml.o and hescape.o and they where both arm64 to rule out Rosetta kicking in to emulate or something like that.

I tried getting the benchmarks running to verify but probably couldn't get the dependencies right because temple complained about wrong number of arguments passed to Haml::Engine.new(@haml_code, format: :html5, escape_html: true), even though I tried with the same versions of haml, slim etc that are specified in the readme.

Maybe this is just locally and hamlit would be faster in production (on linux and x86), but I would sort of like to verify that it's faster for our app before making the switch.

k0kubun commented 1 year ago

If you're using haml.gem and upgrading to another version of haml.gem, can you file this at https://github.com/haml/haml? Haml 6 and Hamlit are different gems.

k0kubun commented 1 year ago

moved to https://github.com/haml/haml/issues/1099