4 ms·
> For instance you’re probably iterating over those six plans and inserting them individually in the DB. Another approach would’ve been to accumulate all of the
by boredtofears 11mo ago
> For instance you’re probably iterating over those six plans and inserting them individually in the DB. Another approach would’ve been to accumulate all of them in memory then build and perform a single query. That’s not something people really consider because it’s “micro” optimization and makes the code look worse.
This same pitfall exists in every language. This has nothing to do with Ruby.
- AlphaSite 11mo agoeh. Ruby makes it easy to do the wrong thing. imo.
- boredtofears 11mo agoMaybe, but this isn’t one of the ways it does.