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
ApcClassLoader
Search
polidog
May 29, 2016
Technology
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ApcClassLoader
polidog
May 29, 2016
More Decks by polidog
See All by polidog
omasushiというライブラリを作った
polidog
0
590
RelayerというPHPのフレームワークを作った
polidog
0
220
AIがコードを書く時代の ジェネレーティブプログラミング
polidog
3
1.4k
小さな開発会社を作った理由(再)
polidog
0
330
React Server ComponentsでAPI不要の開発体験
polidog
1
980
小さな開発会社が受託開発に力を入れる理由
polidog
0
590
小さな開発会社を作った理由
polidog
1
3.8k
小さな開発会社がWebサービスを作る理由
polidog
1
900
トランザクションスクリプトは何がダメなのか?
polidog
2
4.1k
Other Decks in Technology
See All in Technology
Local CI × GitHub Actions
gogutan
2
190
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
170
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
110
Running Kotlin + Quarkus with Lambda
nealle
1
3.7k
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
170
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
340
宣言型部分更新は何を解決しどこへ向かうのか
shuta13
1
450
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
730
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
200
go-sqletch
moznion
0
140
会社説明資料
persolserverworks
0
9.8k
子育てエンジニアの可処分時間が減っても成長を諦めない戦い方
sudoakiy
6
4.6k
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1033
470k
Visualization
eitanlees
153
17k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
480
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
Transcript
ApcClassLoader symfony meetup #12 @polidog
ࣗݾհ • @polidog • λϏΟίϜגࣜձࣾͰSymfonyॻ͍ͯ·͢ • ࠷ۙBEARSundayษڧͯ͠·͢
ApcClassLoaderʁ
None
ApcClassLoaderʁ • web/app.phpͰίϝϯτΞτͯ͋͠Δͭ ͱࢥͬͨΒ࠷৽ͷSymfonyͩͱআ͞Εͯ ͨɾɾɾ • ͳͯ͘ಈ͘ • ͳΜͱͳ࣮͘ߦ͕ૣ͘ͳΓͦ͏
ͱΓ͋͑ͣಈ͔ͯ͠ΈΑ͏
apc(u)͕ඞཁͰ͢ɻ
brew install php70-apcu
web/app.phpΛฤू
use Symfony\Component\ClassLoader\ApcClassLoader; $apcLoader = new ApcClassLoader(sha1(__FILE__), $loader); $loader->unregister(); $apcLoader->register(true);
ܭଌͯ͠Έͨ
ܭଌ݅ • MacBook Pro (Retina, 15-inch, Mid 2014) 16GB Memory,
2.2 GHz Intel Core i7 • php7.0.6 • ϏϧτΠϯαʔόͬͯΔ • ඵؒ10ϦΫΤετΛ5ඵִؒ • vegetaͬͯݕূ https://github.com/tsenart/vegeta
ApcClassLoaderͳ͠
$ echo "GET http://localhost:8000/" | vegeta attack -rate=50 - duration=5s
| vegeta report Requests [total, rate] 50, 10.20 Duration [total, attack, wait] 4.91808977s, 4.899999865s, 18.089905ms Latencies [mean, 50, 95, 99, max] 29.650298ms, 17.586892ms, 39.421233ms, 216.898977ms, 304.779713ms Bytes In [total, mean] 230050, 4601.00 Bytes Out [total, mean] 0, 0.00 Success [ratio] 100.00% Status Codes [code:count] 200:50 Error Set:
ApcClassLoader͋Γ
$ echo "GET http://localhost:8000/" | vegeta attack -rate=50 - duration=5s
| vegeta report Requests [total, rate] 50, 10.20 Duration [total, attack, wait] 4.913044931s, 4.899999873s, 13.045058ms Latencies [mean, 50, 95, 99, max] 12.37756ms, 12.595445ms, 13.760764ms, 13.93599ms, 15.280703ms Bytes In [total, mean] 230050, 4601.00 Bytes Out [total, mean] 0, 0.00 Success [ratio] 100.00% Status Codes [code:count] 200:50 Error Set:
ApcClassLoaderૣ͍ʂʂʂ
ApcClassLoaderԿΛͯ͠ ͍Δͷ͔ʁ
ApcClassLoaderԿΛ͍ͯ͠ Δͷ͔ʁ • spl_autoload_registerʹApcClassLoaderͷloadClassϝιουΛొ͠ ͍ͯΔ͚ͩ • findFileͰapcuʹΩϟογϡ͞Ε͍ͯͳ͚ΕɺϑΝΠϧΛΩϟογϡ ͢ΔΑ͏ʹ͍ͯ͠Δ https://git.io/vrHLh •
௨ৗPSRͷComposer\Autoload\ClassLoaderͷfindFile͕࣮ߦ͞Εͯ ͍ΔͷͰ͍ɻ https://git.io/vrHLN
·ͱΊ
·ͱΊ • ApcClassLoaderૣ͍ʂ • ϓϩμΫγϣϯͰͬͨ΄͏͕ྑͦ͞͏ • ϝϞϦগͳ͍࣮ߦڥͩͱͪΐͬͱ৺ (ࠓௐΔʣ
͓͠·͍ɻ