Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
how require kill spring
Search
Fumiaki MATSUSHIMA
March 25, 2015
Programming
210
1
Share
how require kill spring
永和システムマネジメント・DeNA 技術交流会発表資料
Fumiaki MATSUSHIMA
March 25, 2015
More Decks by Fumiaki MATSUSHIMA
See All by Fumiaki MATSUSHIMA
Learning from performance improvements on GraphQL Ruby
mtsmfm
1
1.3k
Ruby で作る Ruby (物理)
mtsmfm
1
270
GraphQL Ruby benchmark
mtsmfm
1
900
タイムアウトにご用心 / Timeout might break application state
mtsmfm
6
2.7k
Build REST API with GraphQL Ruby
mtsmfm
0
390
GraphQL Ruby をちょっとだけ速くした / Make graphql-ruby faster a bit
mtsmfm
1
780
Gaming PC on GCP
mtsmfm
0
810
How to introduce GraphQL to an existing React-Redux application
mtsmfm
1
310
Canary release in StudySapuri
mtsmfm
0
3.2k
Other Decks in Programming
See All in Programming
Firefoxにコントリビューションして得られた学び
ken7253
2
160
GitHubCopilotCLIをはじめよう.pdf
htkym
0
330
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
3.1k
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
1.2k
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
830
空間オーディオの活用
objectiveaudio
0
150
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
3.1k
Agentic AI & UI: Arcitecture, HITL, Emerging Standards
manfredsteyer
PRO
0
100
My daily life on Ruby
a_matsuda
3
390
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
450
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
200
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
エンジニアに許された特別な時間の終わり
watany
106
240k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
260
Evolving SEO for Evolving Search Engines
ryanjones
0
190
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
140
Skip the Path - Find Your Career Trail
mkilby
1
120
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
190
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
130
Git: the NoSQL Database
bkeepers
PRO
432
67k
Transcript
(株)永和システムマネジメント @mtsmfm 松島 史秋 springの死について 私が知っている1つの方法
松島 史秋 GitHub, Twitter @mtsmfm
None
ある rails 3.2 案件
spring の死
spring の死 \LoadError/
TL;DR rails 上で requireするな
TL;DR rails 上で requireするな ※ ただし stdlib は除く
$ bundle exec spring rspec
Expected /... /break_spring/app/models /animal.rb to define Animal (LoadError)
None
あるから!
None
None
???
$ bundle exec spring rspec すると何が起きるか
※ spring 1.3.3 ※ rails 3.2 のデフォルト設定の場合 ※ rails 4
~> のデフォルト設定の場合は発 生しません
$ bundle exec spring rspec (1回目)
1. gem とか require 2. app 以下とか load 3. テスト実行
(1回目)
簡易 spring
None
require & load run command
None
$ bundle exec spring rspec (2回目、変更無)
(2回目、変更無) 1. gem とか require 2. app 以下とか load 3.
テスト実行
1. gem とか require 2. app 以下とか load 3. テスト実行
(2回目、変更無)
1. gem とか require 2. app 以下とか load 3. テスト実行
(2回目、変更無) fork 前 fork 後
1. gem とか require 2. app 以下とか load 3. テスト実行
(2回目、変更無) fork 前 fork 後
$ touch app/models/cat. rb
$ bundle exec spring rspec (3回目、変更有)
1. load したのを const_remove 2. テスト実行 3. const_missing で require
(3回目、変更有)
1. load したのを const_remove 2. テスト実行 3. const_missing で require
(3回目、変更有)
require 済
require ‘animal’ # => false
Expected /... /break_spring/app/models /animal.rb to define Animal (LoadError)
※ spring 1.3.3 ※ rails 3.2 のデフォルト設定の場合 ※ rails 4
~> のデフォルト設定の場合は発 生しません
1. gem とか require 2. app 以下とか load 3. テスト実行
4. const_missing で require
1. gem とか require 2. app 以下とか load 3. テスト実行
4. const_missing で require fork 前 fork 後
Rails 3 config.cache_classes = true (eager_load = true を兼ねてる) Rails
4 config.cache_classes = true config.eager_load = false
TL;DR rails 上で requireするな ※ ただし stdlib は除く
stdlib の イケてる require 場所 どこ