mobileui-os 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +47 -0
- package/CHANGELOG.md +25 -0
- package/README.md +78 -0
- package/bin/cli.mjs +375 -0
- package/knowledge/android/00-apple-to-android-adaption.md +1499 -0
- package/knowledge/android/accessibility.md +333 -0
- package/knowledge/android/components-controls.md +270 -0
- package/knowledge/android/material-design-3.md +174 -0
- package/knowledge/android/navigation-patterns.md +212 -0
- package/knowledge/apple/00-skill-reading-protocol.md +1296 -0
- package/knowledge/apple/Accessibility, Inclusive Design & Human Factors Intelligence.md +735 -0
- package/knowledge/apple/Advanced Interaction Patterns, Gestures, Feedback & State Transitions.md +1140 -0
- package/knowledge/apple/Advanced Navigation, Information Architecture & Wayfinding.md +551 -0
- package/knowledge/apple/Autonomus Ui-UX Improvement Loop.md +611 -0
- package/knowledge/apple/Color, Materials, Contrast, Themes & Visual Depth.md +1351 -0
- package/knowledge/apple/Content, Copy, Microinteractions & UX Communication.md +642 -0
- package/knowledge/apple/Data-Heavy Interfaces, Tables, Lists, Search, Filtering & Large-Scale Content.md +721 -0
- package/knowledge/apple/Design Systems & Component Architecture.md +412 -0
- package/knowledge/apple/Forms, Input, Data Entry & Validation Intelligence.md +705 -0
- package/knowledge/apple/Interaction, State & Edge-Case Engineering.md +491 -0
- package/knowledge/apple/Interaction-behaviour.md +1378 -0
- package/knowledge/apple/Layout Architecture, Responsive Design & Spatial Systems.md +1365 -0
- package/knowledge/apple/MASTER UI-UX ORCHESTRATOR.md +1210 -0
- package/knowledge/apple/Navigation Architecture, Routing, Deep Linking & State Restoration.md +1392 -0
- package/knowledge/apple/Navigation, Information Architecture & Spatial Hierarchy.md +1613 -0
- package/knowledge/apple/Notifications, Permissions, Privacy and Trust.md +1540 -0
- package/knowledge/apple/Patterns-templates-composition.md +647 -0
- package/knowledge/apple/Performance, Perceived Speed, Motion & Rendering Intelligence.md +855 -0
- package/knowledge/apple/Responsive, Adaptive & Cross-Platform UI Intelligence.md +669 -0
- package/knowledge/apple/Responsive, Adaptive, Accessible & Performant UI.md +545 -0
- package/knowledge/apple/Tablet Adaptation & Multi-Device UX.md +1447 -0
- package/knowledge/apple/UI Implementation & Refactoring.md +498 -0
- package/knowledge/apple/UI-UX Decision-Making, Prioritization & Trade-offs.md +533 -0
- package/knowledge/apple/UI-UX Project Lifecycle & Delivery.md +544 -0
- package/knowledge/apple/User Flows & Experience Architecture.md +335 -0
- package/knowledge/apple/Visual Design Systems, Theming, Tokens & Brand Intelligence.md +764 -0
- package/knowledge/apple/Visual QA, Testing & Validation.md +557 -0
- package/knowledge/apple/accessibility-inclusive-interaction.md +1361 -0
- package/knowledge/apple/accessibility.md +2162 -0
- package/knowledge/apple/color.md +1933 -0
- package/knowledge/apple/component-architecture.md +2208 -0
- package/knowledge/apple/components.md +2172 -0
- package/knowledge/apple/design-decision-framework.md +1883 -0
- package/knowledge/apple/design-review-engine.md +2108 -0
- package/knowledge/apple/design-tokens.md +1943 -0
- package/knowledge/apple/designing-for-ios.md +1680 -0
- package/knowledge/apple/gestures, touch behavior, feedback, motion, and micro-interactions.md +1538 -0
- package/knowledge/apple/hig-foundation.md +1806 -0
- package/knowledge/apple/iconography.md +1903 -0
- package/knowledge/apple/interaction-patterns.md +2513 -0
- package/knowledge/apple/interaction.md +2141 -0
- package/knowledge/apple/ios-alerts-confirmations-destructive-actions.md +1342 -0
- package/knowledge/apple/ios-components-and-controls.md +1634 -0
- package/knowledge/apple/ios-components-patterns.md +1343 -0
- package/knowledge/apple/ios-design-system-architecture.md +1520 -0
- package/knowledge/apple/ios-empty-error-offline-states.md +1370 -0
- package/knowledge/apple/ios-empty-loading-error-recovery.md +1674 -0
- package/knowledge/apple/ios-forms-and-input.md +1458 -0
- package/knowledge/apple/ios-forms-input-data-entry.md +1308 -0
- package/knowledge/apple/ios-gestures-and-touch.md +1272 -0
- package/knowledge/apple/ios-lists-collections-and-data-display.md +1735 -0
- package/knowledge/apple/ios-loading-progress-async-states.md +1378 -0
- package/knowledge/apple/ios-materials-and-surfaces.md +1543 -0
- package/knowledge/apple/ios-motion-animation-transitions.md +1178 -0
- package/knowledge/apple/ios-navigation-and-information-architecture.md +1674 -0
- package/knowledge/apple/ios-navigation-user-flows-design-architecture.md +1195 -0
- package/knowledge/apple/ios-search-and-discovery.md +1456 -0
- package/knowledge/apple/ios-search-filtering-discovery.md +1402 -0
- package/knowledge/apple/ios-sheets-modals-popovers.md +1205 -0
- package/knowledge/apple/ios-typography-icons-visual-hierarchy.md +1431 -0
- package/knowledge/apple/layout.md +2331 -0
- package/knowledge/apple/media-centric-content-ui-patterns.md +1470 -0
- package/knowledge/apple/motion, transitions, physics, and animation language.md +1535 -0
- package/knowledge/apple/motion-and-animation.md +1698 -0
- package/knowledge/apple/motion.md +2087 -0
- package/knowledge/apple/navigation.md +2281 -0
- package/knowledge/apple/responsive-adaptive.md +2159 -0
- package/knowledge/apple/screen-architecture.md +2067 -0
- package/knowledge/apple/typography, Content Hierarchy & Readability.md +1411 -0
- package/knowledge/apple/typography.md +1802 -0
- package/knowledge/apple/ui-ux inteligence audit.md +106 -0
- package/knowledge/apple/visual-design-and-premium-ui.md +1555 -0
- package/knowledge/apple/visual-hierarchy-engine.md +1647 -0
- package/knowledge/apple/visual-materials.md +2189 -0
- package/package.json +53 -0
- package/principles/design-principles.md +37 -0
- package/principles/platform-principles.md +25 -0
- package/principles/ux-principles.md +16 -0
- package/references/official-links.md +11 -0
- package/skills/accessibility-engineer/SKILL.md +125 -0
- package/skills/analytics-engineer/SKILL.md +283 -0
- package/skills/animation-engineer/SKILL.md +316 -0
- package/skills/component-designer/SKILL.md +75 -0
- package/skills/component-library-engineer/SKILL.md +140 -0
- package/skills/component-library-ops/SKILL.md +155 -0
- package/skills/design-system/SKILL.md +77 -0
- package/skills/design-token-engineer/SKILL.md +203 -0
- package/skills/design-token-pipeline/SKILL.md +277 -0
- package/skills/device-lab-engineer/SKILL.md +387 -0
- package/skills/forms-engineer/SKILL.md +79 -0
- package/skills/internationalization-engineer/SKILL.md +256 -0
- package/skills/motion-designer/SKILL.md +77 -0
- package/skills/native-data-fetching/SKILL.md +50 -0
- package/skills/navigation-architect/SKILL.md +65 -0
- package/skills/performance-engineer/SKILL.md +250 -0
- package/skills/platform-specialist/SKILL.md +95 -0
- package/skills/pre-release-gate/SKILL.md +75 -0
- package/skills/screen-designer/SKILL.md +117 -0
- package/skills/security-engineer/SKILL.md +375 -0
- package/skills/skills.json +134 -0
- package/skills/testing-auditor/SKILL.md +62 -0
- package/skills/ui-architect/SKILL.md +86 -0
- package/skills/ui-implementer/SKILL.md +188 -0
- package/skills/ux-architect/SKILL.md +49 -0
- package/skills/ux-auditor/SKILL.md +52 -0
- package/skills/visual-auditor/SKILL.md +71 -0
- package/templates/audit-report.md +29 -0
- package/templates/design-tokens.ts +33 -0
- package/templates/screen-spec.md +61 -0
- package/workflows/new-screen.md +17 -0
- package/workflows/pre-release.md +21 -0
- package/workflows/redesign.md +14 -0
- package/workflows/ui-audit.md +22 -0
|
@@ -0,0 +1,855 @@
|
|
|
1
|
+
## File 72 — Performance, Perceived Speed, Motion & Rendering Intelligence
|
|
2
|
+
|
|
3
|
+
File 71 taught the agent how to make interfaces **accessible and human-centered**.
|
|
4
|
+
|
|
5
|
+
File 72 teaches it how to make those interfaces **feel fast, remain responsive, and scale without degrading the experience**.
|
|
6
|
+
|
|
7
|
+
> **Performance is part of UX. A technically fast application can still feel slow, while a well-designed interface can make unavoidable waiting feel controlled and understandable.**
|
|
8
|
+
|
|
9
|
+
The agent should optimize both **actual performance** and **perceived performance**.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# 1. Performance model
|
|
14
|
+
|
|
15
|
+
The agent should reason through:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
USER ACTION
|
|
19
|
+
↓
|
|
20
|
+
INPUT RESPONSE
|
|
21
|
+
↓
|
|
22
|
+
STATE UPDATE
|
|
23
|
+
↓
|
|
24
|
+
RENDER
|
|
25
|
+
↓
|
|
26
|
+
NETWORK / COMPUTATION
|
|
27
|
+
↓
|
|
28
|
+
FEEDBACK
|
|
29
|
+
↓
|
|
30
|
+
COMPLETION
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Every stage can introduce latency.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
# 2. Actual vs perceived performance
|
|
38
|
+
|
|
39
|
+
### Actual performance
|
|
40
|
+
|
|
41
|
+
Measures things such as:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
CPU
|
|
45
|
+
Memory
|
|
46
|
+
Rendering
|
|
47
|
+
Network
|
|
48
|
+
Disk
|
|
49
|
+
Startup
|
|
50
|
+
Bundle size
|
|
51
|
+
Database
|
|
52
|
+
Animation frames
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Perceived performance
|
|
56
|
+
|
|
57
|
+
Measures what the user experiences:
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
Immediate feedback
|
|
61
|
+
Progress visibility
|
|
62
|
+
Predictability
|
|
63
|
+
Continuity
|
|
64
|
+
Responsiveness
|
|
65
|
+
Waiting anxiety
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Both matter.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
# 3. Responsiveness hierarchy
|
|
73
|
+
|
|
74
|
+
The agent should prioritize:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
Immediate input feedback
|
|
78
|
+
↓
|
|
79
|
+
Visible state transition
|
|
80
|
+
↓
|
|
81
|
+
Progress indication
|
|
82
|
+
↓
|
|
83
|
+
Background processing
|
|
84
|
+
↓
|
|
85
|
+
Completion
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
A button should not appear completely dead while a long operation begins.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
# 4. Main-thread responsiveness
|
|
93
|
+
|
|
94
|
+
Avoid blocking the primary UI thread with:
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
Heavy calculations
|
|
98
|
+
Large parsing operations
|
|
99
|
+
Expensive rendering
|
|
100
|
+
Synchronous storage operations
|
|
101
|
+
Large data transformations
|
|
102
|
+
Unnecessary loops
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Move expensive work away from critical interaction paths when architecture allows it.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
# 5. Rendering efficiency
|
|
110
|
+
|
|
111
|
+
The agent should investigate:
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
Unnecessary re-renders
|
|
115
|
+
Large component trees
|
|
116
|
+
Repeated calculations
|
|
117
|
+
Unstable references
|
|
118
|
+
Excessive state updates
|
|
119
|
+
Unnecessary animations
|
|
120
|
+
Heavy shadows/effects
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Optimization should be evidence-driven rather than based on assumptions.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
# 6. React / React Native considerations
|
|
128
|
+
|
|
129
|
+
For React-based interfaces, investigate:
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
Component boundaries
|
|
133
|
+
State ownership
|
|
134
|
+
Memoization
|
|
135
|
+
Derived state
|
|
136
|
+
List virtualization
|
|
137
|
+
Image rendering
|
|
138
|
+
Animation architecture
|
|
139
|
+
Navigation lifecycle
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Do not blindly add memoization everywhere.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
# 7. Large lists
|
|
147
|
+
|
|
148
|
+
Large collections should use appropriate rendering strategies.
|
|
149
|
+
|
|
150
|
+
Consider:
|
|
151
|
+
|
|
152
|
+
```text
|
|
153
|
+
Virtualization
|
|
154
|
+
Windowing
|
|
155
|
+
Pagination
|
|
156
|
+
Incremental loading
|
|
157
|
+
Stable keys
|
|
158
|
+
Item measurement
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The goal is to avoid rendering thousands of unnecessary elements simultaneously.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
# 8. Images
|
|
166
|
+
|
|
167
|
+
Images can dominate performance.
|
|
168
|
+
|
|
169
|
+
Optimize:
|
|
170
|
+
|
|
171
|
+
```text
|
|
172
|
+
Resolution
|
|
173
|
+
Compression
|
|
174
|
+
Format
|
|
175
|
+
Caching
|
|
176
|
+
Lazy loading
|
|
177
|
+
Thumbnail generation
|
|
178
|
+
Memory usage
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Don't load a 4K image when the UI only displays a 100px thumbnail.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
# 9. Asset strategy
|
|
186
|
+
|
|
187
|
+
Classify assets:
|
|
188
|
+
|
|
189
|
+
```text
|
|
190
|
+
Critical
|
|
191
|
+
Important
|
|
192
|
+
Deferred
|
|
193
|
+
Optional
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Load according to priority.
|
|
197
|
+
|
|
198
|
+
For example:
|
|
199
|
+
|
|
200
|
+
```text
|
|
201
|
+
App shell
|
|
202
|
+
↓
|
|
203
|
+
Primary content
|
|
204
|
+
↓
|
|
205
|
+
Secondary content
|
|
206
|
+
↓
|
|
207
|
+
Decorative content
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
# 10. Startup performance
|
|
213
|
+
|
|
214
|
+
Startup should be treated as a pipeline:
|
|
215
|
+
|
|
216
|
+
```text
|
|
217
|
+
Process launch
|
|
218
|
+
↓
|
|
219
|
+
Runtime initialization
|
|
220
|
+
↓
|
|
221
|
+
Application initialization
|
|
222
|
+
↓
|
|
223
|
+
Data loading
|
|
224
|
+
↓
|
|
225
|
+
UI ready
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Identify what genuinely needs to happen before the first usable screen.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
# 11. Startup anti-patterns
|
|
233
|
+
|
|
234
|
+
Detect:
|
|
235
|
+
|
|
236
|
+
```text
|
|
237
|
+
Everything initialized at launch
|
|
238
|
+
Large synchronous database reads
|
|
239
|
+
Unnecessary API calls
|
|
240
|
+
Heavy analytics initialization
|
|
241
|
+
Loading every asset
|
|
242
|
+
Blocking migrations
|
|
243
|
+
Unnecessary authentication work
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Defer work that isn't required immediately.
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
# 12. Loading states
|
|
251
|
+
|
|
252
|
+
Loading UI should correspond to the actual operation.
|
|
253
|
+
|
|
254
|
+
Examples:
|
|
255
|
+
|
|
256
|
+
```text
|
|
257
|
+
Skeleton
|
|
258
|
+
Spinner
|
|
259
|
+
Progress bar
|
|
260
|
+
Placeholder
|
|
261
|
+
Shimmer
|
|
262
|
+
Inline loading
|
|
263
|
+
Background refresh
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Don't use one generic loading mechanism everywhere.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
# 13. Skeleton screens
|
|
271
|
+
|
|
272
|
+
Skeletons are useful when:
|
|
273
|
+
|
|
274
|
+
```text
|
|
275
|
+
Layout is predictable
|
|
276
|
+
Content takes meaningful time to arrive
|
|
277
|
+
The user benefits from seeing structure early
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
They are less useful when the operation completes almost instantly.
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
# 14. Progress indicators
|
|
285
|
+
|
|
286
|
+
For measurable work:
|
|
287
|
+
|
|
288
|
+
```text
|
|
289
|
+
0%
|
|
290
|
+
↓
|
|
291
|
+
25%
|
|
292
|
+
↓
|
|
293
|
+
50%
|
|
294
|
+
↓
|
|
295
|
+
75%
|
|
296
|
+
↓
|
|
297
|
+
100%
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Prefer real progress.
|
|
301
|
+
|
|
302
|
+
Never fabricate precise progress values simply to make the UI appear active.
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
# 15. Indeterminate operations
|
|
307
|
+
|
|
308
|
+
When duration cannot be predicted:
|
|
309
|
+
|
|
310
|
+
```text
|
|
311
|
+
Processing…
|
|
312
|
+
Syncing…
|
|
313
|
+
Preparing…
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Use an indeterminate indicator rather than fake percentages.
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
# 16. Optimistic UI
|
|
321
|
+
|
|
322
|
+
For low-risk operations:
|
|
323
|
+
|
|
324
|
+
```text
|
|
325
|
+
USER ACTION
|
|
326
|
+
↓
|
|
327
|
+
IMMEDIATE UI CHANGE
|
|
328
|
+
↓
|
|
329
|
+
BACKGROUND REQUEST
|
|
330
|
+
↓
|
|
331
|
+
SUCCESS
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
On failure:
|
|
335
|
+
|
|
336
|
+
```text
|
|
337
|
+
ROLLBACK
|
|
338
|
+
+
|
|
339
|
+
EXPLAIN
|
|
340
|
+
+
|
|
341
|
+
RECOVERY
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Optimistic UI should not hide important failures.
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
# 17. Caching
|
|
349
|
+
|
|
350
|
+
Use caching when it meaningfully reduces latency.
|
|
351
|
+
|
|
352
|
+
Potential layers:
|
|
353
|
+
|
|
354
|
+
```text
|
|
355
|
+
Memory
|
|
356
|
+
Local storage
|
|
357
|
+
Database
|
|
358
|
+
HTTP/network
|
|
359
|
+
Computed results
|
|
360
|
+
Images
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
The agent should define:
|
|
364
|
+
|
|
365
|
+
```text
|
|
366
|
+
What is cached?
|
|
367
|
+
How long?
|
|
368
|
+
When invalidated?
|
|
369
|
+
What happens when stale?
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
# 18. Stale-while-revalidate
|
|
375
|
+
|
|
376
|
+
For suitable data:
|
|
377
|
+
|
|
378
|
+
```text
|
|
379
|
+
Cached data
|
|
380
|
+
↓
|
|
381
|
+
Show immediately
|
|
382
|
+
↓
|
|
383
|
+
Refresh in background
|
|
384
|
+
↓
|
|
385
|
+
Update UI
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
This can make applications feel substantially faster.
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
# 19. Network performance
|
|
393
|
+
|
|
394
|
+
Consider:
|
|
395
|
+
|
|
396
|
+
```text
|
|
397
|
+
Latency
|
|
398
|
+
Bandwidth
|
|
399
|
+
Request count
|
|
400
|
+
Payload size
|
|
401
|
+
Caching
|
|
402
|
+
Retries
|
|
403
|
+
Timeouts
|
|
404
|
+
Parallelism
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Avoid sending information the client doesn't need.
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
# 20. Request architecture
|
|
412
|
+
|
|
413
|
+
The agent should detect:
|
|
414
|
+
|
|
415
|
+
```text
|
|
416
|
+
Waterfalls
|
|
417
|
+
Duplicate requests
|
|
418
|
+
Unnecessary polling
|
|
419
|
+
Over-fetching
|
|
420
|
+
Under-fetching
|
|
421
|
+
Repeated queries
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
Prefer efficient request orchestration.
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
# 21. Debouncing and throttling
|
|
429
|
+
|
|
430
|
+
Useful for:
|
|
431
|
+
|
|
432
|
+
```text
|
|
433
|
+
Search
|
|
434
|
+
Autocomplete
|
|
435
|
+
Resize events
|
|
436
|
+
Scroll events
|
|
437
|
+
Validation
|
|
438
|
+
Filtering
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
But don't add arbitrary delays.
|
|
442
|
+
|
|
443
|
+
The objective is:
|
|
444
|
+
|
|
445
|
+
```text
|
|
446
|
+
Reduce unnecessary work
|
|
447
|
+
without making interaction feel slower.
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
# 22. Motion performance
|
|
453
|
+
|
|
454
|
+
Animations should remain smooth.
|
|
455
|
+
|
|
456
|
+
Watch:
|
|
457
|
+
|
|
458
|
+
```text
|
|
459
|
+
Frame rate
|
|
460
|
+
Dropped frames
|
|
461
|
+
Layout recalculation
|
|
462
|
+
Expensive effects
|
|
463
|
+
Large shadows
|
|
464
|
+
Blur
|
|
465
|
+
Filters
|
|
466
|
+
Complex transforms
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
Prefer efficient animation properties and platform-appropriate animation systems.
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
# 23. Motion hierarchy
|
|
474
|
+
|
|
475
|
+
Not every animation deserves the same cost.
|
|
476
|
+
|
|
477
|
+
Prioritize:
|
|
478
|
+
|
|
479
|
+
```text
|
|
480
|
+
Interaction feedback
|
|
481
|
+
Navigation transitions
|
|
482
|
+
State changes
|
|
483
|
+
Important contextual motion
|
|
484
|
+
Decorative motion
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
If performance is constrained, decorative motion should be reduced first.
|
|
488
|
+
|
|
489
|
+
---
|
|
490
|
+
|
|
491
|
+
# 24. Animation interruptibility
|
|
492
|
+
|
|
493
|
+
Good interactions should often allow:
|
|
494
|
+
|
|
495
|
+
```text
|
|
496
|
+
Interrupt
|
|
497
|
+
Reverse
|
|
498
|
+
Cancel
|
|
499
|
+
Continue
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
An animation that prevents the user from interacting until it finishes can make the interface feel slower than it actually is.
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
# 25. Reduced motion
|
|
507
|
+
|
|
508
|
+
Respect reduced-motion preferences where supported.
|
|
509
|
+
|
|
510
|
+
When motion is reduced:
|
|
511
|
+
|
|
512
|
+
```text
|
|
513
|
+
Replace large transitions
|
|
514
|
+
with
|
|
515
|
+
simple state changes
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
Do not remove necessary feedback.
|
|
519
|
+
|
|
520
|
+
---
|
|
521
|
+
|
|
522
|
+
# 26. Perceived latency
|
|
523
|
+
|
|
524
|
+
The agent should distinguish:
|
|
525
|
+
|
|
526
|
+
```text
|
|
527
|
+
0–instant
|
|
528
|
+
Short
|
|
529
|
+
Noticeable
|
|
530
|
+
Long
|
|
531
|
+
Very long
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
As waiting increases, communication should become stronger.
|
|
535
|
+
|
|
536
|
+
For example:
|
|
537
|
+
|
|
538
|
+
```text
|
|
539
|
+
Short
|
|
540
|
+
→ subtle feedback
|
|
541
|
+
|
|
542
|
+
Long
|
|
543
|
+
→ progress/status
|
|
544
|
+
|
|
545
|
+
Very long
|
|
546
|
+
→ progress + background continuation + recovery
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
---
|
|
550
|
+
|
|
551
|
+
# 27. Avoid dead time
|
|
552
|
+
|
|
553
|
+
A common UX failure:
|
|
554
|
+
|
|
555
|
+
```text
|
|
556
|
+
Tap
|
|
557
|
+
↓
|
|
558
|
+
Nothing
|
|
559
|
+
↓
|
|
560
|
+
Eventually something happens
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
Better:
|
|
564
|
+
|
|
565
|
+
```text
|
|
566
|
+
Tap
|
|
567
|
+
↓
|
|
568
|
+
Immediate acknowledgement
|
|
569
|
+
↓
|
|
570
|
+
Processing state
|
|
571
|
+
↓
|
|
572
|
+
Result
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
The user should know the system received the action.
|
|
576
|
+
|
|
577
|
+
---
|
|
578
|
+
|
|
579
|
+
# 28. Performance budgets
|
|
580
|
+
|
|
581
|
+
Define budgets where appropriate:
|
|
582
|
+
|
|
583
|
+
```text
|
|
584
|
+
Startup
|
|
585
|
+
Interaction latency
|
|
586
|
+
Frame rendering
|
|
587
|
+
Memory
|
|
588
|
+
Network payload
|
|
589
|
+
Image size
|
|
590
|
+
Bundle size
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
The exact limits should depend on the platform and application.
|
|
594
|
+
|
|
595
|
+
---
|
|
596
|
+
|
|
597
|
+
# 29. Memory management
|
|
598
|
+
|
|
599
|
+
Watch for:
|
|
600
|
+
|
|
601
|
+
```text
|
|
602
|
+
Large images
|
|
603
|
+
Retained screens
|
|
604
|
+
Unbounded caches
|
|
605
|
+
Duplicate data
|
|
606
|
+
Large arrays
|
|
607
|
+
Audio/video buffers
|
|
608
|
+
Listeners
|
|
609
|
+
Timers
|
|
610
|
+
Subscriptions
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
Memory leaks can become UX problems through:
|
|
614
|
+
|
|
615
|
+
```text
|
|
616
|
+
Slowdown
|
|
617
|
+
Crashes
|
|
618
|
+
Battery drain
|
|
619
|
+
System termination
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
---
|
|
623
|
+
|
|
624
|
+
# 30. Battery efficiency
|
|
625
|
+
|
|
626
|
+
Mobile interfaces should avoid unnecessary:
|
|
627
|
+
|
|
628
|
+
```text
|
|
629
|
+
Polling
|
|
630
|
+
Background processing
|
|
631
|
+
Animations
|
|
632
|
+
Location updates
|
|
633
|
+
Sensors
|
|
634
|
+
Network requests
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
Performance isn't only about speed.
|
|
638
|
+
|
|
639
|
+
Efficiency matters too.
|
|
640
|
+
|
|
641
|
+
---
|
|
642
|
+
|
|
643
|
+
# 31. Offline performance
|
|
644
|
+
|
|
645
|
+
Where appropriate:
|
|
646
|
+
|
|
647
|
+
```text
|
|
648
|
+
Cached data
|
|
649
|
+
Local state
|
|
650
|
+
Offline actions
|
|
651
|
+
Deferred synchronization
|
|
652
|
+
Retry queues
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
The application should remain useful when connectivity disappears.
|
|
656
|
+
|
|
657
|
+
---
|
|
658
|
+
|
|
659
|
+
# 32. Performance-aware error handling
|
|
660
|
+
|
|
661
|
+
When operations fail:
|
|
662
|
+
|
|
663
|
+
```text
|
|
664
|
+
Detect
|
|
665
|
+
↓
|
|
666
|
+
Stop unnecessary work
|
|
667
|
+
↓
|
|
668
|
+
Preserve user state
|
|
669
|
+
↓
|
|
670
|
+
Explain
|
|
671
|
+
↓
|
|
672
|
+
Retry appropriately
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
Avoid repeated automatic retries that consume resources and worsen the problem.
|
|
676
|
+
|
|
677
|
+
---
|
|
678
|
+
|
|
679
|
+
# 33. Instrumentation
|
|
680
|
+
|
|
681
|
+
The agent should encourage measurement.
|
|
682
|
+
|
|
683
|
+
Track where useful:
|
|
684
|
+
|
|
685
|
+
```text
|
|
686
|
+
Startup duration
|
|
687
|
+
Interaction latency
|
|
688
|
+
Screen rendering
|
|
689
|
+
Network latency
|
|
690
|
+
Request failures
|
|
691
|
+
Memory usage
|
|
692
|
+
Crash rates
|
|
693
|
+
Frame drops
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
Optimization should be guided by evidence.
|
|
697
|
+
|
|
698
|
+
---
|
|
699
|
+
|
|
700
|
+
# 34. Performance profiling workflow
|
|
701
|
+
|
|
702
|
+
```text
|
|
703
|
+
REPRODUCE
|
|
704
|
+
↓
|
|
705
|
+
MEASURE
|
|
706
|
+
↓
|
|
707
|
+
IDENTIFY BOTTLENECK
|
|
708
|
+
↓
|
|
709
|
+
HYPOTHESIZE
|
|
710
|
+
↓
|
|
711
|
+
CHANGE
|
|
712
|
+
↓
|
|
713
|
+
MEASURE AGAIN
|
|
714
|
+
↓
|
|
715
|
+
COMPARE
|
|
716
|
+
↓
|
|
717
|
+
KEEP / REVERT
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
Never assume an optimization helped without measuring.
|
|
721
|
+
|
|
722
|
+
---
|
|
723
|
+
|
|
724
|
+
# 35. Performance regression detection
|
|
725
|
+
|
|
726
|
+
After significant UI changes, check:
|
|
727
|
+
|
|
728
|
+
```text
|
|
729
|
+
Startup
|
|
730
|
+
Navigation
|
|
731
|
+
Lists
|
|
732
|
+
Search
|
|
733
|
+
Forms
|
|
734
|
+
Animations
|
|
735
|
+
Images
|
|
736
|
+
Memory
|
|
737
|
+
Network
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
Shared components can introduce performance regressions across the entire application.
|
|
741
|
+
|
|
742
|
+
---
|
|
743
|
+
|
|
744
|
+
# 36. Perceived-performance patterns
|
|
745
|
+
|
|
746
|
+
Useful patterns include:
|
|
747
|
+
|
|
748
|
+
```text
|
|
749
|
+
Instant acknowledgement
|
|
750
|
+
Skeleton loading
|
|
751
|
+
Optimistic updates
|
|
752
|
+
Progressive rendering
|
|
753
|
+
Prefetching
|
|
754
|
+
Caching
|
|
755
|
+
Background refresh
|
|
756
|
+
Placeholder content
|
|
757
|
+
Deferred loading
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
Each should be used where appropriate rather than everywhere.
|
|
761
|
+
|
|
762
|
+
---
|
|
763
|
+
|
|
764
|
+
# 37. Performance anti-patterns
|
|
765
|
+
|
|
766
|
+
Detect:
|
|
767
|
+
|
|
768
|
+
```text
|
|
769
|
+
Premature optimization
|
|
770
|
+
Unmeasured optimization
|
|
771
|
+
Huge initial payloads
|
|
772
|
+
Rendering everything
|
|
773
|
+
Repeated API calls
|
|
774
|
+
Request waterfalls
|
|
775
|
+
Fake progress
|
|
776
|
+
Heavy startup
|
|
777
|
+
Excessive animation
|
|
778
|
+
Memory-heavy images
|
|
779
|
+
Infinite background polling
|
|
780
|
+
Unbounded caching
|
|
781
|
+
Blocking UI operations
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
---
|
|
785
|
+
|
|
786
|
+
# 38. Performance quality checklist
|
|
787
|
+
|
|
788
|
+
```text
|
|
789
|
+
□ Input feels immediate
|
|
790
|
+
□ UI doesn't block unnecessarily
|
|
791
|
+
□ Startup is prioritized
|
|
792
|
+
□ Heavy work is deferred
|
|
793
|
+
□ Lists scale
|
|
794
|
+
□ Images are optimized
|
|
795
|
+
□ Network requests are efficient
|
|
796
|
+
□ Caching strategy exists
|
|
797
|
+
□ Loading states match operation
|
|
798
|
+
□ Progress is truthful
|
|
799
|
+
□ Animations remain smooth
|
|
800
|
+
□ Reduced motion is respected
|
|
801
|
+
□ Memory usage is controlled
|
|
802
|
+
□ Battery usage is reasonable
|
|
803
|
+
□ Offline behavior is considered
|
|
804
|
+
□ Performance is measured
|
|
805
|
+
□ Regression testing exists
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
---
|
|
809
|
+
|
|
810
|
+
# 39. Performance intelligence workflow
|
|
811
|
+
|
|
812
|
+
```text
|
|
813
|
+
IDENTIFY CRITICAL USER PATHS
|
|
814
|
+
↓
|
|
815
|
+
DEFINE PERFORMANCE BUDGETS
|
|
816
|
+
↓
|
|
817
|
+
MEASURE BASELINE
|
|
818
|
+
↓
|
|
819
|
+
IDENTIFY BOTTLENECKS
|
|
820
|
+
↓
|
|
821
|
+
OPTIMIZE
|
|
822
|
+
↓
|
|
823
|
+
IMPROVE PERCEIVED SPEED
|
|
824
|
+
↓
|
|
825
|
+
PROFILE AGAIN
|
|
826
|
+
↓
|
|
827
|
+
REGRESSION TEST
|
|
828
|
+
```
|
|
829
|
+
|
|
830
|
+
---
|
|
831
|
+
|
|
832
|
+
## File 72 operating principle
|
|
833
|
+
|
|
834
|
+
> **Make the application respond immediately, communicate honestly during unavoidable waits, and spend computational resources only where they improve the user's experience.**
|
|
835
|
+
|
|
836
|
+
The agent should optimize this equation:
|
|
837
|
+
|
|
838
|
+
```text
|
|
839
|
+
USER VALUE
|
|
840
|
+
──────────────
|
|
841
|
+
TIME + CPU + MEMORY + NETWORK + BATTERY
|
|
842
|
+
```
|
|
843
|
+
|
|
844
|
+
while remembering that:
|
|
845
|
+
|
|
846
|
+
```text
|
|
847
|
+
FAST
|
|
848
|
+
≠
|
|
849
|
+
FEELS FAST
|
|
850
|
+
```
|
|
851
|
+
|
|
852
|
+
The best interfaces optimize **both**.
|
|
853
|
+
|
|
854
|
+
---
|
|
855
|
+
|