You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
2018.01.19 週刊Railsウォッチ(20180119)derailed_benchmarks gem、PostgreSQLをGraphQL API化するPostGraphile、機械学習でモック画像をHTML化ほか こんにちは、hachi8833です。Nintendo Laboにいろいろ持ってかれそうで気になってます。 つっつきボイス: 「任天堂のものづくりセンス、パないなー」 なんでこんなに感動してしまったかと考えていたんだけど、きっと心の中の「小5病」に火が着いたんだな — 稲見昌彦🌤️INAMI Masahiko (@drinami) January 18, 2018 それでは今週のウォッチ、いってみましょう。 Rails: 今週の改修 今回はCommit差分から見繕いました。 left_outer_joinsをunscopeできるようになった commit: f3d69
This week, I've been playing with Puma processes. Headius, Nate Berkopec, you can probably stop reading now. You won't learn much ;-) One consequence of the GIL is that a single Ruby process has limited ability to fully use the capabilities of a multi-core machine, including a larger AWS instance. As a result, the optimum number of Rails processes for your AWS instance is probably not just one. I'
表題の通りですが、本記事では次の事項は扱いません。 gatling の使用方法 目的 テレビ露出時にかかる負荷をある程度予測しておくことで、それにかかる費用をできるだけ小さく留めること(最小化とは言いません)。 最小化しようとするとギリギリのラインを攻めるためにかなり厳密に見積もらないといけなくなりますが、そうすると人件費の方が高くつくので本末転倒です。 その計算をするのに僕のリソースをもって 1日かかるなら、1〜2万円多く AWS や GCP に献上した方が他の仕事も進められてみんな幸せです。 従って、本記事での検証は比較的ざっくりです。 構成 本試験は、以下の様な構成のアプリケーションを対象に行います。 AWS 特に特筆すべきことのない、標準的な構成です。 DNS とかはあまり関係ないので抜いています。 Amazon ELB Amazon EC2 Amazon RDS(MySQL、マス
(訳注:2016/3/2、頂いた翻訳フィードバックをもとに記事を修正いたしました。) Railsアプリでのキャッシングは、「たまに夕食を一緒にするけれど、本当はもっと頻繁に一緒にいるべき友達」に少し似ています。パフォーマンスをまじめに考えるRailsアプリのほぼ全てで、もっとキャッシングを使えるはずですが、ほとんどのRailsアプリでは、完全にキャッシングを避けています。それでも普通は、Railsで高速なサーバ応答を達成するための唯一の道は、キャッシングの知的な利用なのです。約250msの応答時間を、簡単に50~100msに高速化できます。 定義についての注意 ― この記事は、アプリケーション層のキャッシングのみを対象としています。HTTPキャッシング(これは全く別の難物で、あなたのアプリケーションに実装する必要はありません)は、別の機会で扱いましょう。 するべきキャッシングをしない理由
Comparing ancestry and closure_tree for your nested data structure Sun, Sep 13, 2015 When it comes to implementing ActiveRecord nesting, there are a few popular implementations. In this post I will look closer at how Ancestry and Closure tree work and what the pros and cons are. How ancestry works Ancestry works by adding one column (by default named “ancestry”) that replaces the parent_id. Instea
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のど
【19-B-4】 そろそろ俺たちの本気を見せてやるぜ!~ マイクロソフトとOSSごった煮 DevOps 衝撃デモシリーズ!
Know of any guides to writing performance tests using Rspec? Does Rspec have the capability to run specs in benchmarking or profiling mode similar to the way Rails has performance tests that run in these modes (http://guides.rubyonrails.org/ performance_testing.html)? On Jan 16, 2011, at 8:29 PM, Evan wrote: Know of any guides to writing performance tests using Rspec? There’s nothing built in as o
Benchmark-IPSはRuby標準添付のBenchmarkライブラリを便利に拡張してくれるGemです。 使い方 導入 $ gem install benchmark-ips 用例 普通のBenchmarkならbmメソッドを呼び出すところ、 ipsメソッドを呼び出すあたりが違います。 また、IPSならcompare!という比較用メソッドが用意されています。 require 'benchmark/ips' def slow %w(a b c).shuffle.first end def fast %w(a b c).sample end Benchmark.ips do |x| x.report( "fast" ) { fast } x.report( "slow" ) { slow } x.compare! end 結果はこの通り。 $ ruby benchmarkips.rb Cal
What is RubyBench? RubyBench is a long running Ruby benchmarking tool. Currently, Ruby benchmark scripts and Discourse benchmark scripts have been implemented and are run for every commit and release. If you've noticed a regression, feel free to use RubyBench when opening a new issue. Try out RubyBench! → What's the Plan? RubyBench is currently still in its early stages but has already proven to b
Sam Saffron Programming, Technology and the Art of Hacking Recently Godfrey Chan got Discourse working on Rails Master. It was a rather long task that involved some changes to Discourse internals and some changes to Rails internals. Knowing Rails 4.2 was just around the corner I decided that it seemed like the perfect time to see how performance is. Seeing Rails 4.2 contains the adequate record pa
This guide covers how you can become a part of the ongoing development of Ruby on Rails. After reading this guide, you will know: How to use GitHub to report issues. How to clone main and run the test suite. How to help resolve existing issues. How to contribute to the Ruby on Rails documentation. How to contribute to the Ruby on Rails code. Ruby on Rails is not "someone else's framework". Over th
Help us understand the problem. What is going on with this article? Rails3.2からRails4.2に上げたらActiveRecordが遅くなったので、どうやって調査して、どのように対処したかを語ってみたい。 とても長いので、ダルい人は最初と最後だけ読めばよいです。 TL;DR 環境: Ruby 2.1.5 ARオブジェクトを大量に(ざっくり750kくらい)loadするバッチ処理 3.2系での実行時間は約480sec、 4.2系では約2900sec 約6倍の性能劣化 原因: preloadで性能劣化してた CollectionProxyの生成周りで遅くなってた Rails4からARオブジェクトの1attribute毎にObject生成するので遅い GCの時間も増えた 調査方法: Githubのcommit、Issueを
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く