> On Feb 22, 2019, at 2:36 PM, nickweil...@gmail.com wrote:
>
> Hoping to direct some people to this question on StackOverflow:
> https://stackoverflow.com/questions/54815058/why-might-average-free-memory-slots-dramatically-increase-after-upgrading-to-rub
>
> After upgrading to Ruby 2.6.1 I noticed a large increase in free memory slots
> with a consistent pattern for them tapering off (graphs in StackOverflow
> question). I don't notice and performance impact, but interested in why it
> might be happening.
>
> Thanks!
Do you have JIT enabled or not? There's a lot of potential for JIT, but it is
very experimental for now, and not so good for Rails yet. Otherwise it sounds
like a garbage collection (GC) issue.
I would recommend reading this:
https://pragprog.com/book/adrpo/ruby-performance-optimization
There's some good stuff there on how to bench and tune things (albeit, slightly
out of date).
A few simple examples is to use direct SQL queries when possible instead of
full model loads, and using the BANG (!) methods when possible (in other words,
using, say "reject!" instead of "myvar = myvar.reject ...")
Hope this helps.
Phil
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/287098B0-44FE-4DDA-9367-9E290CD59343%40gmail.com.
For more options, visit https://groups.google.com/d/optout.