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
blitz_test_speed.pdf
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Tetsuya Fukuda
February 03, 2023
Technology
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
blitz_test_speed.pdf
Tetsuya Fukuda
February 03, 2023
More Decks by Tetsuya Fukuda
See All by Tetsuya Fukuda
アプリケーションの拡大に伴う開発者体験の悪化をなんとかする
ghken
0
78
辛くない受託開発
ghken
0
3.1k
Other Decks in Technology
See All in Technology
大型犬好きによるPugの紹介
yamanoku
1
160
『SAR衛星データ解析入門』のご紹介とその応用
syuchimu
0
120
How to Design Configuration for Rails Applications
willnet
1
780
⾮構造化データを価値に変える AI エージェント基盤とその組織
ivry_presentationmaterials
0
190
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
210
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
1
1.8k
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
110
Classmethod Company Deck
satoshi7
1
680
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
420
JAWS-UGグッズ職人仕事の流儀
kentapapa
0
100
今さら理解するウェブフォントver.2026
takanorip
3
770
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
110
Featured
See All Featured
WCS-LA-2024
lcolladotor
0
890
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
570
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
780
30 Presentation Tips
portentint
PRO
1
430
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Chasing Engaging Ingredients in Design
codingconduct
0
360
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
410
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
570
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Music & Morning Musume
bryan
48
7.4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Transcript
Blitz.jsのテスト遅い問 題を解決したい!! KYOTO.JS 18
自己紹介 GHKEN Twitter: @gendaihyousyou RIT Inc. CTO/CHRO ◦ Next, Rails,
AWS多め 2歳の娘と0歳の息子
Blitz.js使ってますか? Next.js + Prismaなフルスタックフレームワーク スポンサーやってます
課題
テストが遅い
テストが遅い
単純な例で確認してみる
単純な例で確認してみる
テストが増えるとどうなるか
テストが増えるとどうなるか
どうやらこいつが悪そう
db.$resetは何をしてるのか
db.$resetを使わずにど うするか
Railsだとどうなってる?
SAVEPOINTを使ってる
ただ、現状のPrismaではサポートされてなさそう
truncateしてみる
おもったより早くない
なぜか
deleteにしてみる
早くなった
結論 ⚫db.$resetを使わない ⚫データが少ないならtruncateではなくdeleteのほうが早い ⚫(今回は問題に遭遇しなかったけど)deleteだけだとauto incrementずれるので注意 ⚫RailsだとSAVEPOINT使ってネストしたトランザクションからロールバックしてるので早い