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
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
76
辛くない受託開発
ghken
0
3k
Other Decks in Technology
See All in Technology
Databricksメトリクスビューはじめてのもくもく会
taka_aki
0
100
Harness Engineering on Rails
joelq
0
670
10年欲しかった音楽管理アプリを、AIと一緒に作りはじめた
judau
1
150
C#未経験の僕がAIに読めるコードを書かせるまで
maguroalternative
0
330
AI感のないAWS構成図をAIエージェントに描かせたい!
sagochiko
2
450
【Findyテック文化祭ワークショップ】新卒エンジニア&採用担当と作る、 なりたい姿と今やるべき一歩
dip_tech
PRO
0
120
Hermes Agentで、AIが調べて記事を書くブログを作った話
blueb
0
110
[Kiro Meetup #7] Kiro Crew Dive Deep
konippi
0
390
あけおめLINE 傾向とその対策
nasa9084
0
340
spanner-autoscalerに学ぶ CRD設計パターン 〜自動化と緊急時対応を両立する Kubernetesコントローラーの作り方〜
tkuchiki
0
190
Azure Serverless 2026:Production-ready な AI エージェント基盤 / Azure Serverless 2026: Production-Ready AI Agent Platform
miyake
2
630
PQC移行の今 -- IETF からみた現在地
satokan
4
520
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
464
34k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
420
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
740
How Software Deployment tools have changed in the past 20 years
geshan
2
34k
Designing Experiences People Love
moore
143
24k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
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使ってネストしたトランザクションからロールバックしてるので早い