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
パフォーマンス改善とユニットテスト
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
shtnkgm
March 26, 2019
Programming
1.8k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
パフォーマンス改善とユニットテスト
Bonfire iOS #5 発表資料
shtnkgm
March 26, 2019
More Decks by shtnkgm
See All by shtnkgm
Combine入門
shtnkgm
2
330
Property Wrappers
shtnkgm
0
380
Saliency Detection
shtnkgm
0
91
iOSのコードベースレイアウト
shtnkgm
2
850
20190117_iOSLT_CBLinSwift.pdf
shtnkgm
0
130
SwiftとFunctional Reactive Programming
shtnkgm
0
210
20180710_iOSLT_iOSでDarkModeを実装する
shtnkgm
0
130
20180410_iOSLT_SwiftとProtocol-OrientedProgramming
shtnkgm
0
140
20180220_iOSLT_Swiftとオブジェクト間の通知のパターン
shtnkgm
0
170
Other Decks in Programming
See All in Programming
Performance Optimization With LLMs
xleitix
0
180
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
270
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
320
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
0
140
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
290
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
170
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
34k
AWSに止められる覚悟してますか?
morizo_1984
2
540
ActionController meets Protocol Buffers
sorah
0
660
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
350
GraphQL の onError と Nullability のこれから
quramy
0
150
Featured
See All Featured
How to build a perfect <img>
jonoalderson
1
6.1k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Into the Great Unknown - MozCon
thekraken
41
2.8k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
750
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
310
Evolving SEO for Evolving Search Engines
ryanjones
0
330
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Making Projects Easy
brettharned
120
6.8k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Transcript
#POpSFJ04ʛ!TIUOLHN ύϑΥʔϚϯεվળͱϢχοτςετ
4IPUB/BLBHBNJ ϠϑʔגࣜձࣾʛΤϯδχΞ !TIUOLHN
:BIPPγϣοϐϯά
wJ04ΞϓϦϦϦʔε wίʔυن wϢχοτςετ w୲J04ΤϯδχΞ ɿʙ ɿສߦʢ0CKFDUJWF$ɿʣ ɿ݅ʢΧόϨοδɿʣ ɿ໊ʢ Ћʣ
ݱࡏͷׂ w ύϑΥʔϚϯεվળ w ٕज़తෛ࠴ͷղফ w ։ൃޮͷվળ ʢGBTUMBOFɺ4XJGU-JOUɺ%BOHFSɺ4XJGU(FOɺ4DSFXESJWFSDEɺ1FSJQIFSZʣ ػೳ։ൃ νʔϜ
ٕज़վળ νʔϜ
ࠓ͍ͨ͜͠ͱ
:BIPPγϣοϐϯάΞϓϦͷ ύϑΥʔϚϯεվળͱ Ϣχοτςετ׆༻ͷ
˞ܭଌࣗࣾௐ 501ը໘ ΞϓϦىಈʙදࣔ·Ͱͷվળ #FGPSFɿฏۉඵ
ΞϓϦىಈʙදࣔ·Ͱͷվળ #FGPSFɿฏۉඵ ˞ܭଌࣗࣾௐ ݮ 501ը໘ "GUFSɿฏۉඵ
None
ϘτϧωοΫՕॴͷௐࠪ
"1*௨৴Ͱ ಈతʹมΘΔλϒϝχϡʔ
ىಈ͔Β501දࣔ·ͰͷྲྀΕ
ىಈ "1*௨৴ "1*௨৴ λϒදࣔ 501දࣔ
ىಈ "1*௨৴ "1*௨৴ λϒදࣔ 501දࣔ
ىಈ "1*௨৴ "1*௨৴ λϒදࣔ 501දࣔ λϒՃ
ํ0,ɺͰ
ϓϩάϥϜͷෳࡶ͕૿͢ ฒྻԽඇಉظԽʹΑΓ
վमରͷΫϥε͕طʹෳࡶ
վमରͷΫϥεΛͳ͕ΊΔ w ॳظ࣮͔Βܦ͍ͬͯΔ w मਖ਼ͷܧ͗͠ʹΑΔ'BU7$ʢߦPWFSʣ w 7JFXϏδωεϩδοΫ͕ࠞࡏ͠ɺաଟ w Ϣχοτςετ΄΅ͳ͠
Ͳ͏͢Δʁ
طଘΫϥε 'BU7$
طଘΫϥε Ճ ❌͞ΒʹංେԽ Ճ
طଘΫϥε Ϋϥε Ϋϥε Ϋϥε খ͘͞Γग़͠
طଘΫϥε Ϋϥε Ϋϥε Ϋϥε ฒྻԽॲཧ ඇಉظԽॲཧ
Ϋϥε Ϋϥε Ϋϥε طଘΫϥε ✅ ✅ ✅ Ϣχοτςετ
Ϋϥε Ϋϥε Ϋϥε طଘΫϥε ✅ ✅ ✅ ґଘΫϥεΛ֎෦͔Βઃఆ ʢ%FQFOEFODZ*OKFDUJPOʣ *OKFDU
*OKFDU
.PDL Ϋϥε .PDL Ϋϥε Ϋϥε طଘΫϥε ✅ ✅ ✅ ✅
্ҐϨΠϠʔ Ϣχοτςετ
͏গ͠۩ମతʹ w λϒϝχϡʔͷදࣔϩδοΫΛΓग़͠ɺ 4UBDL7JFXԽ w ঢ়ଶཧͱ௨৴ϩδοΫΛΓग़͠ w λϒͷछྨΛFOVNͰ࠶ཧʜͳͲ
7JFXϨΠϠʔͷϢχοτςετ
ॻ͖ʹ͍͕͘ɺ ෆ͕҆͋Εॻ͘
7JFXͷςετ͕ॻ͖ʹ͍͘ཧ༝ w νΣοΫର͕7JFXͷදࣔͱͳΔͨΊɺग़ྗΛऔಘͮ͠Β͍ ʢ҉తͳग़ྗͷνΣοΫʣ w 6*,JUͷϥΠϑαΠΫϧʹԊͬͯදࣔྃΛͭ ʢඇಉظςετʣ
// Tips: ΞΫηεम০ࢠΛมߋ͢Δ // before @IBOutlet private weak var titleLabel:
UILabel! // after @IBOutlet private(set) weak var titleLabel: UILabel!
// Tips: subviews͔ΒಛఆΫϥεViewͷΈΛऔಘ͢Δ let labels = view.findViews(subclassOf: UILabel.self) let tabViews
= view.findViews(subclassOf: TabView.self) extension UIView { var recursiveSubviews: [UIView] { return subviews + subviews.flatMap { $0.recursiveSubviews } } func findViews<T: UIView>(subclassOf: T.Type) -> [T] { return recursiveSubviews.compactMap { $0 as? T } } }
// Tips: දࣔྃͷػ func waitUntil(condition: () -> Bool) { while
!condition() { RunLoop.main.run(until: Date(timeIntervalSinceNow: 0.001)) } }
7JFXͷϢχοτςετΛ ॻ͍ͯΑ͔ͬͨ͜ͱ
Ϣχοτςετ͕௨Βͳ͍ λϒͷ͕ظ௨ΓʹͳΒͳ͍ ❌
खಈςετͰҰݟਖ਼͍͠
%FCVH7JFX)JFSBSDIZ
None
None
None
None
ݪҼ 6*4UBDL7JFXͷαϒϏϡʔͷআͷํ
6*4UBDL7JFXͰλϒΛཧ λϒͷՃɿBEE"SSBOHFE4VCWJFX @ λϒͷআɿSFNPWF"SSBOHFE4VCWJFX @
// arrangedSubviewsΛআ stackView.arrangedSubviews .forEach { stackView.removeArrangedSubview($0) } // subviewsΛআ stackView.subviews
.forEach { $0.removeFromSuperview() }
7JFXͷϢχοτςετͰ खಈςετͰؾ͖ͮʹ͍͘ ʹؾ͚ͮͨ
ৼΓฦΓ
w ϢχοτςετΛॻ͖ͳ͕ΒϦϑΝΫλͯ͠ ࠓޙϝϯς͍͢͠ίʔυʹ w खಈςετͰͷखΓ͕࠷খݶ ʢόάΛઌग़͠Ͱݕग़ʣ (
w ϩάૹ৴͍ͯ͠Δσʔλͷத͕Ұ෦ܽଛ w ϢχοτςετɺखಈςετͰݕͰ͖ͣ )
ߴԽ͗ͯ͢͠લఏ่͕݅ΕΔ w ߴԽલλΠϛϯά͕͔ͬͨͷͰɺਖ਼͘͠ಈ࡞ w ϩάૹ৴ͷλΠϛϯά͕ૣ͘ͳΓɺ ඞཁͳσʔλ͕औΕͯͳ͍ͷʹϩάૹ৴ ૹ৴σʔλͷऔಘ ϩάૹ৴˓ ϩάૹ৴º ߴԽ
Ϟδϡʔϧؒͷ҉తͳґଘؔ ϢχοτςετͰؾ͖ͮʹ͍͘
func sendLog() { assert(analyticsData.foo != nil, "foo͕औಘͰ͖͍ͯΔ͜ͱ") logger.sendLog() }
·ͱΊ
·ͱΊ w ύϑΥʔϚϯεվળͱϦϑΝΫλϦϯά Ͱ͖ΕηοτͰ w खಈςετͰؾ͚ͮͳ͍ෆ۩߹ʹ 7JFXͷςετͰؾ͚ͮͨ w Ϣχοτςετ͚ͩͰͳ͘"TTFSUJPO׆༻
͋Γ͕ͱ͏͍͟͝·ͨ͠ #POpSFJ04ʛ!TIUOLHN