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
PRO
May 29, 2016
Technology
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ApcClassLoader
polidog
PRO
May 29, 2016
More Decks by polidog
See All by polidog
omasushiというライブラリを作った
polidog
PRO
0
280
RelayerというPHPのフレームワークを作った
polidog
PRO
0
200
AIがコードを書く時代の ジェネレーティブプログラミング
polidog
PRO
3
1.3k
小さな開発会社を作った理由(再)
polidog
PRO
0
320
React Server ComponentsでAPI不要の開発体験
polidog
PRO
1
950
小さな開発会社が受託開発に力を入れる理由
polidog
PRO
0
560
小さな開発会社を作った理由
polidog
PRO
1
3.7k
小さな開発会社がWebサービスを作る理由
polidog
PRO
1
890
トランザクションスクリプトは何がダメなのか?
polidog
PRO
2
4.1k
Other Decks in Technology
See All in Technology
その Lambda、8分で 管理者権限まで奪われます
k1nakayama
7
3.5k
Goodbye ShellScript, Hello File-based App
shunsock
0
670
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
880
Kiro Meetup #8 Kiro アップデート (2026/3/21〜2026/9/24)
katzueno
1
120
作って終わりじゃないサーバーレス 〜9年運用する大規模EC物流API基盤の設計・運用のリアル〜
zozotech
PRO
0
450
Azure Serverless 2026:Production-ready な AI エージェント基盤 / Azure Serverless 2026: Production-Ready AI Agent Platform
miyake
2
530
SREへの勘違いに気づいた後の話
tomodakengo
0
140
AIに賢く動いてもらうためのコンテキスト〜Snowflake女子会 vol.8
snowwmn0824
0
160
Cloudflare Workers 向けアプリを C# で構築する ~WASM Native AOT への道~
nenonaninu
1
1k
Oracle Cloud Network Path Analyzerを試してみた/I Tried Out Oracle Cloud Network Path Analyzer
masakiokuda
1
110
時うどん〜Socket.getifaddrsで学ぶネットワーク編 / Tokiudon: The Socket.getifaddrs Edition
coe401_
4
220
今話題のAI「Jev」って何? 宇宙最速で学ぶ会
minorun365
PRO
30
19k
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
290
Mind Mapping
helmedeiros
1
370
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Discover your Explorer Soul
emna__ayadi
2
1.3k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
480
Optimising Largest Contentful Paint
csswizardry
37
4k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
510
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
430
Chasing Engaging Ingredients in Design
codingconduct
0
320
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ૣ͍ʂ • ϓϩμΫγϣϯͰͬͨ΄͏͕ྑͦ͞͏ • ϝϞϦগͳ͍࣮ߦڥͩͱͪΐͬͱ৺ (ࠓௐΔʣ
͓͠·͍ɻ