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
920
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
120
Learning from performance improvements on GraphQL Ruby
mtsmfm
1
1.4k
Ruby で作る Ruby (物理)
mtsmfm
1
300
タイムアウトにご用心 / Timeout might break application state
mtsmfm
6
2.7k
Build REST API with GraphQL Ruby
mtsmfm
0
400
GraphQL Ruby をちょっとだけ速くした / Make graphql-ruby faster a bit
mtsmfm
1
790
Gaming PC on GCP
mtsmfm
0
810
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
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
520
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
130
スマート反転とウェブアクセシビリティ
camiha
0
170
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
260
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
200
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
160
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
220
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
460
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
110
Foundry Localでエージェント開発
seosoft
0
160
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
AIの中の人になってみる
htkym
0
170
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.3k
GitHub's CSS Performance
jonrohan
1033
470k
Odyssey Design
rkendrick25
PRO
2
800
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
190
Discover your Explorer Soul
emna__ayadi
2
1.3k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
510
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
The Invisible Side of Design
smashingmag
301
52k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Visualization
eitanlees
152
17k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
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/