That’s Not a Memory Leak, It’s Bloat | Engine Yard Blog
What Is Bloat?
Related cards:
Ruby and Rails: Debugging a Memory Leak
A memory leak is an unintentional, uncontrolled, and unending increase in memory usage. No matter how small, eventually, a leak will cause your process to run out of memory and crash.
If you have learned about a memory leak, looking at the num...
Bugfix: Rails 2 does not find an association when it is named with a string instead of a symbol
Association named 'variations' was not found; perhaps you misspelled it?
I just was hunting down a strange error with this model:
class Model
placeholder = 'variations'
has_many placeholder
nested_scope :v...
Building and Scaling a Startup on Rails: 12 Things We Learned the Hard Way - Axon Flux - A Ruby on Rails Blog
There are a bunch of basic functional elements to building out a popular Rails app that I've never really seen explained in one place, but we had to learn the hard way while building Posterous.
Accept nested attributes for a record that is not an association
Note: Instead of using the method in this card, you probably want to use ActiveType's nested attributes which is a much more refined way of doing this.
The attach...
Intridea Blog: REST isn't what you think it is, and that's OK
Pretty much everyone who claims to have a REST API, in fact, does not. The closest I’ve found is the Sun Cloud API which actually defines a number of custom media types for resources and is discoverable based on a single known end-point. Everyone ...
Rails: Fixing the memory leak / performance issues in prepend_view_path
Recently we detected a memory leak in one of our applications. Hunting it down, we found that the memory leak was located in Rails' #prepend_view_path
. It occurs when the instance method prepend_view_path
is called in each request, which is a ...
Handy: A regex that validates all valid email addresses (give or take) - Axon Flux // A Ruby on Rails Blog
/^([\w!#$%&'*+-/=?^`{|}~]+.)*[\w!#$%&'*+-/=?^`{|}~]+@((((([a-z0-9]{1}[a-z0-9-]{0,62}[a-z0-9]{1})|[a-z]).)+[a-z]{2,6})|(\d{1,3}.){3}\d{1,3}(:\d{1,5})?)$/i
Make Sure Your Rails Application is Actually Caching (and not just pretending) - Alfa Jango Blog » Blog Archive
It occurred to me that many Rails/Passenger/Apache applications may have caching set up in a way that it appears to be caching, when it is not actually caching.
Ruby on Rails: Finding a memory leak
The author describes his little journey in hunting down a memory leak. Maybe his approach and tooling may one day help you in a similar situation.
Tools: rbtrace
, ObjectSpace.trace_object_allocations_start
, [heapy
](https://github.com/zomboc...
Careful with '||=' - it's not 'memoize'
When you do something like this in your code:
def var_value
@var ||= some_expensive_calculation
end
Be aware that it will run some_expensive_calculation every time you call var_value **if some_expensive_calculation returns n...