Learn how to transform your snail-paced Rails app into a sub-100 millisecond powerhouse. The Complete Guide to Rails Performance is a full-stack course that gives you the tools to make your Ruby on Rails applications faster and more delightful for users, scale better and for less money, and take less effort to maintain. 3rd Edition: Updated for Rails 5 through Rails 7.1 Why is your Rails applicati
AさんはRailsで書かれたある遅いコードの検証をしていました。 X-Runtimeヘッダを見ると $ curl -Is localhost:3000/hello | grep X-Runtime X-Runtime: 5.008580 5秒もかかってる。 しかしRailsのログを見ると Started HEAD "/hello" for 127.0.0.1 at Tue Apr 03 13:04:11 +0900 2012 Processing by HelloController#index as */* Rendered text template (0.0ms) Completed 200 OK in 10ms (Views: 9.7ms) こんな感じで10msで返していることになっている。なんだこれは? こういう状況で疑わしいことの一つとして、Rack等のMiddlewareのど
1. ベンチマーカー プロファイルすると、プロファイル自体に時間がかかるので正しく速度が測れない。そのためベンチマーカーも使うと良い。 ただし、ベンチマーカーはどこが遅いか等の解決の糸口は教えてくれない。 benchmark-ips 2. プロファイラ 実際に速度のボトルネックを見つける際に使う。 stackprof どのメソッドに多くの時間を費やしているかがわかる これを入れても速度にさほど影響がない rblineprof 行ごとにかかっている時間を出してくれる peek-rblineprofを使うとブラウザで結果が見れる ただしプロファイリングに結構時間がかかる (3. NewRelic) 実際、これらのことを手元でやらなくても、特にstackprof的なことや、どこのページやどのSQLクエリが特に遅いかなどは、 New Relic がやってくれます。お金を払うと結構詳細な部分も見れま
Stay Relevant and Grow Your Career in TechPremium ResultsPublish articles on SitePointDaily curated jobsLearning PathsDiscounts to dev toolsStart Free Trial7 Day Free Trial. Cancel Anytime. Key Takeaways Ruby’s performance has significantly improved with the advent of Ruby 2.0+, debunking the myth that Ruby is a slow programming language. The key to optimizing performance lies in sound object-orie
String literals immutability is one of the new features you can find in Ruby 2.3. But, what does this imply? Same value literals points to the same object Better performance Thread safety Currently string immutability is included as opt-in, being the first step of a multi stage rollout and if it works well it will be enabled by default on Ruby 3.0. So it still can end up being just an experiment.
In my last post, we looked at how you can dig into memory "leaks" on Heroku. These techniques all work well if you can reproduce the memory bloat locally. When you can't, we can take a "heap dump" off of a running production server and analyze it for more information. In this two-post series, we'll look at the basics of what a heap dump is, what the contents look like, how to analyze one, and how
Releases, Offers & More Be the first to hear about our newest content, best promotions and upcoming events. Plus get 25% off your next purchase. Newsletter Sign Up Download Accounts Your email address is your account identifier. You can create a password, or just download from the links sent via email. My Orders (Resend order emails) How We're Different Hands-on instructions Solutions to real-worl
ぼくのassets:precompileへの熱い想いは こちら をご確認ください。 で、あんまりにも遅いので調べていたらこんな こんなIssue を発見した。 なんかforkしてcore使うようにして高速化してくれるgem作ったぜボーイズ! みたいなこと書いてある! これは……!! 早速試す。 steel/sprockets-derailleur setup Rails4系なら、Gemfileにgem 'sprockets-derailleur'を追加して、bundle install する。 で、config/environmet.rb とかにrequire 'sprockets-derailleur' と書いておく。 Rails3.2系なら、上記に加えて config/initializers/sprockets_derailleur.rb というファイルを以下の内容で作成する mod
すいません。締切守れませんでした…。 やっぱ、java-jaの忘年会の翌日は辛い…。 はじめに Webシステムを開発していると切っても切れないのがJavaScriptです。 Railsはかなり早い時期からalt-JSや結合、minify等を組み込めるようにフレームワークにそれを取り入れてきました。 それを支えているのがRails3.1から導入されたsprocketsです。 それに伴なってJSのライブラリをどうやって管理するかという点について、独自の路線を取ることになりました。 JSのライブラリを同梱したgemパッケージにラップしてrubygemsとして管理する方法です。 ある程度は上手くいっていたし、今もその流れは続いているんですが、時々問題になることもあります。 例えばメンテナの対応時期がズレてて古いバージョンのままだったり、似たようなgemが乱立してややこしくなったり。(backbon
Alexander Dymo Alex is the co-author of the KDevelop IDE for Linux and Mac and was the founding engineer at Acunote. 1 Introduction I often hear that Rails is slow. This has become a common theme among the Ruby and Rails community. But it is actually a myth. It's easy to make your application up to 10x faster just by using Rails in the right way. Here's what you need to know to optimize your Rails
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く