by adamors · 2y ago · 0 comments
With YJIT enabled memory usage ballooned and performance dipped below non-YJIT Ruby 3.2, IIRC the difference was a good 10% degradation. Granted, it's an API only service so no HTML is being generated, only JSON and that could be the culprit.
Suffice it to say, we didn't enable YJIT for 3.2. Maybe 3.3 is indeed different, but both the faster and less memory claims are really suspicious to me.
If what is slow is some RUby code like Active Model Serializers etc, then maybe it can help a bit there.
But yes, generally YJIT works very well on HTML templates because they are compiled as large methods with not a lot of branches.