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
Golangアプリを小さくしてみよう
Search
aozora0000
February 24, 2018
Programming
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Golangアプリを小さくしてみよう
第三回umeda.goでLT発表出来なかったやーつ
aozora0000
February 24, 2018
More Decks by aozora0000
See All by aozora0000
服装コーディネートサービス.pdf
aozora0000
0
50
教えるという事
aozora0000
0
36
Other Decks in Programming
See All in Programming
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
500
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
790
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
R8 の設定見直しでアプリサイズ削減
andpad
0
220
Railsバージョンを4倍にした話
optim
0
450
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
630
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
690
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
5.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The SEO Collaboration Effect
kristinabergwall1
1
590
YesSQL, Process and Tooling at Scale
rocio
174
15k
Product Roadmaps are Hard
iamctodd
55
13k
It's Worth the Effort
3n
188
29k
Music & Morning Musume
bryan
48
7.4k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Design in an AI World
tapps
1
350
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Site-Speed That Sticks
csswizardry
13
1.6k
Transcript
GolangΞϓϦΛখ͘͞ ͯ͠ΈΑ͏ ୈࡾճumeda.goͰLTൃදग़དྷͳ͔ͬͨʔͭ
୭Ͱ͔͢ʁ • PHPͷํ͔Βདྷ·ͨ͠ • TwitterͰ@aozora0000ͱͯ͠׆ಈ • ϓϩμΫγϣϯͰ΄΅goະಋೖͰ͢
GoͰͨ·ʹݴΘΕΔͷ͕ όΠφϦαΠζ͕େ͖͍
ϏϧυΦϓγϣϯແ͠ 100%
খͯ͘͞͠ΈΑ͏
ϏϧυΦϓγϣϯͰগ͠খ͘͞ ͳͬͯͳ͍ $ go build -ldflags '-w -s' ./
όΠφϦͷσόοά༻σʔλΛআ 86% $ strip [filename]
όΠφϦΛѹॖ 28%ʂʂʂ $ gzexe [filename] • gzipύοέʔδʹೖ͍ͬͯ·͢ • ࣮ߦ࣌ࣗݾల։ͯ͠όΠφϦ࣮ߦ͢ΔͷͰΦʔόʔϔου༗ Γ
UPXͬͯͷ͋ΔΒ͍͠ 32% $ upx [filename] • https://github.com/upx/upx • ࣮ߦ࣌ࣗݾల։ͯ͠όΠφϦ࣮ߦ͢ΔͷͰΦʔόʔϔου༗ Γ
DockerͰେ׆༂ʂ ͏େ͖͍ͳΜͯݴΘͤͳ͍
͋Γ͕ͱ͏͍͟͝·ͨ͠