サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
iPhone 16
jamesgolick.com
tl;dr Method resolution is expensive, so method caches are crucial to invocation performance. Your Ruby code probably calls methods kind of often, so invocation performance matters. MRI's method cache invalidation strategy is quite naive, leading to very low hit rates in most Ruby code. I wrote some patches that substantially improve the situation. This blog post is surprisingly uninflammatory. Th
This is a long one, and y'all are busy I'm sure so here's the tl;dr: If you run ruby in production, you need to keep track of GC stats. Ruby 1.9.3's GC::Profiler does a bunch of really weird shit. It keeps a 104 byte sample of every GC run since it was enabled forever. Calling GC::Profiler.total_time loops over every sample in memory to calculate the total. The space used to keep those samples in
Note: This is going to sound crazy at first, but bear with me. The current best-practice for writing rails code dictates that your business logic belongs in your model objects. Before that, it wasn't uncommon to see business logic scattered all over controller actions and even view code. Pushing business logic in to models makes apps easier to understand and test. I used this technique rather succ
For almost 6 years, the dominant "best practice" for building rails applications has been skinny controller, fat model. In other words, put all of your business logic in to your models — keeping it out of your controllers. The result is typically a small number of bloated objects that are impossible to reason about or test in isolation [1]. That property is important. To understand why, let's take
I've been a big proponent of NoSQL for a while. I have played with just about all of the new generation of data stores. We almost got cassandra running in production once, and we've been running mongodb in production for about six months now. But, here's the thing: as awesome as these new dbs are, they're still young. Our app generates a ton of data and gets pretty serious traffic. So, we started
Presenters were a hot topic in the rails community last year. A lot of prominent bloggers wrote about using them, and the implementations they had come up with. Oddly, though, when I needed one a couple of weeks ago, I was unable to find a suitable implementation. Lots of articles — no code. Let's answer the question on everybody's mind before we move on. Feel free to skip ahead if you already kn
このページを最初にブックマークしてみませんか?
『jamesgolick.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く