Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
GraphQL Ruby benchmark
Search
Fumiaki MATSUSHIMA
August 31, 2022
Programming
930
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GraphQL Ruby benchmark
GraphQL Tokyo #18 発表資料
https://www.meetup.com/ja-JP/graphql-tokyo/events/286913987/
Fumiaki MATSUSHIMA
August 31, 2022
More Decks by Fumiaki MATSUSHIMA
See All by Fumiaki MATSUSHIMA
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
220
Learning from performance improvements on GraphQL Ruby
mtsmfm
1
1.4k
Ruby で作る Ruby (物理)
mtsmfm
1
310
タイムアウトにご用心 / Timeout might break application state
mtsmfm
6
2.7k
Build REST API with GraphQL Ruby
mtsmfm
0
410
GraphQL Ruby をちょっとだけ速くした / Make graphql-ruby faster a bit
mtsmfm
1
810
Gaming PC on GCP
mtsmfm
0
820
How to introduce GraphQL to an existing React-Redux application
mtsmfm
1
330
Canary release in StudySapuri
mtsmfm
0
3.3k
Other Decks in Programming
See All in Programming
Agents on Rails - Rails at Scale 2026
irinanazarova
0
540
すこし踏み込む CancellationToken
htkym
2
1.7k
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
420
ChromeでローカルLLM
ryu1013
0
130
APNsからLive Activityを開始する話
yumnumm
0
170
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
16k
ジョジョの世界をXRで再現する
mofurune
0
160
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
490
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
22
22k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
340
Kotlinの15年とServer-Side Kotlin
n_takehata
1
140
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
Test your architecture with Archunit
thirion
2
2.4k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
360
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
730
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
320
Music & Morning Musume
bryan
48
7.4k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
550
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
Transcript
@mtsmfm GraphQL Ruby ベンチマーク
松島 史秋 Backend engineer at Autify GitHub, Twitter @mtsmfm
https://autify.com/careers
https://www.meetup.com/ja-JP/GraphQL-Tokyo/
https://ninirb.github.io
大事なことは最初に - GraphQL Ruby v2.0.13 は 1000 要素あるとき に 1
フィールド足すと 15 ms くらい処理時間が 増える (2.60GHz CPU) - v2.0.13 は v1.5.15 と比べて倍くらい遅くなって いる - つまり倍くらい速くなる余地がある気がする
GraphQL Ruby なんか遅い?
https://speakerdeck.com/mtsmfm/make-graphql-ruby-faster-a-bit
https://speakerdeck.com/mtsmfm/make-graphql-ruby-faster-a-bit
前回得たこと、気になったこと - 1000 要素 4 フィールドで 60ms - 実際 4
フィールドしかないことはほぼない - 1 フィールドにつきどれくらいかかる? - 増えれば増えるほど遅くなる? - リリースごとだんだん遅くなってる?
ベンチマーク内容 type Article { field0: String! field1: String! ... fieldN:
String! } type Query { articles: [Article!]! } query { articles { field0, field1, ..., fieldN } }
ベンチマーク内容 type Article { field0: String! field1: String! ... fieldN:
String! } type Query { articles: [Article!]! } query { articles { field0, field1, ..., fieldN } } 要素数 フィールド数
ベンチマーク内容 - Query 文字列を渡して Ruby の Hash オブジェ クトが返ってくるまでの時間 -
30 秒を超えるまでループして処理時間と回数を 記録 - Ruby 2.7.6 - 古い GraphQL Ruby を動かすため 2 系
ベンチマーク環境 - GitHub Actions (ubuntu-latest) - Intel(R) Xeon(R) Platinum 8171M
CPU @ 2.60GHz - 2 コア - 具体的なスペックは引きによって変わることがあるかも - 全部 1 実行で回している - https://github.com/mtsmfm/graphql-ruby-benchmark
1 フィールドに つきどれくらい かかる?
None
1 フィールドにつきどれくらいかかる? - 1000 要素のとき、だいたい 15 ms くらい - 前回
1000 要素 4 フィールド 60 ms だったのでそれっ ぽい (マシンは違うけど) - フィールド数が少ないと 1 フィールドあたりの時 間が多い - おそらくクエリのパースとかの分 - 100 フィールド以降はほぼ変わらない
リリースごと だんだん遅く なってる?
https://github.com/mtsmfm/graphql-ruby-benchmark/blob/eaf93fb7ef10753d571eff13b635cf33167dcc03/graphql.rb 全バージョンで動くコードを書いた
None
None
GraphQL Ruby のバージョンごとの速度 - 1.1 と 1.5 は 1.8 以降の倍くらい速かった
- 最初期が最速ではなかった
None
ご清聴ありがとうございました - GraphQL Ruby v2.0.13 は 1000 要素あるとき に 1
フィールド足すと 15 ms くらい処理時間が 増える (2.60GHz CPU) - v2.0.13 は v1.5.15 と比べて倍くらい遅くなって いる - つまり倍くらい速くなる余地がある気がする
Credits Background pattern from Toptal Subtle Patterns https://www.toptal.com/designers/subtlepatterns/