News for hackers. Stuff that matters.
Re:Reasons to use Phoenix instead of Rails by sanderjd on Sunday November 26, 2017 @06:05PM (#15783615)
Another difference (which, as I recall, mattered for us) is that class objects in Ruby take up quite a bit of permanent space in memory.
Re:Reasons to use Phoenix instead of Rails by tychver on Sunday November 26, 2017 @07:21PM (#15783910)
Ruby is actually pretty good in this regard. If you define your module or class anonymously, but give it a name using a constant, Ruby will GC it when possible. The standard way of defining modules and classes obviously means they can never be GCed.

Java doesn't, or at least didn't, collect anonymous classes without an additional GC flag being enabled, which could bite you quite hard using JRuby with gems which made heavy use of anonymous classes.

Re:Reasons to use Phoenix instead of Rails by sanderjd on Monday November 27, 2017 @12:38AM (#15785104)
In practice, modules and classes are not defined that way - likely not in your own application, and certainly not in all the gems you depend on, or in the Rails framework itself. That entire set of transitive dependencies can take up a lot of memory.
Re:Reasons to use Phoenix instead of Rails by tychver on Monday November 27, 2017 @01:33AM (#15785316)
The class definitions will be a tiny fraction of memory usage. A template Rails app memory usage only has about 20% managed by Ruby. The rest is the VM, C libraries, maybe long strings etc. Definitely not class definitions pulled in from gems.