Skip to content

Instantly share code, notes, and snippets.

@fgarcia
Created January 7, 2015 07:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fgarcia/2d386a6ddd273229d113 to your computer and use it in GitHub Desktop.
Save fgarcia/2d386a6ddd273229d113 to your computer and use it in GitHub Desktop.
Can you create too many objects?
Listening to Ruby Rogues I heard one of the panels claiming performance problems because too many objects where created on every request:
http://devchat.tv/ruby-rogues/186-rr-the-4-rules-of-simple-design-with-corey-haines
(Search for: immutability)
I was curious since I started using DDD patterns the number of classes and temporal objects have exploded.
The speaker mentions "a ton of new objects for every request", so I assume that "a ton" is about hundreds or thousand of objects within a large loop, long running loop, nothing to be concerned if it is just a linear sequence of actions for a response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment