~/talk

Understanding The Iterable Differs

Talkat NG-DE Conference 2022 · 2022-10-06..10-07· [angular, frontend-architecture]
slides:none on file

Explains that Angular exposes IterableDiffers and KeyValueDiffers as core providers that compute per-change records (added, removed, moved) with currentIndex and previousIndex so change detection can update only affected DOM nodes. Shows code using IterableDiffers.find/create, DoCheck and forEachAddedItem/forEachMovedItem/forEachRemovedItem, then builds a custom ngStyle-like structural directive using KeyValueDiffers plus ElementRef and Renderer2. Notes default algorithm is O(n) and references a linked‑list/immutability trick (Minko) to approach O(1).

AI-written summary · about

  1. 0:00Introduction
  2. 1:49Why performance matters
  3. 3:57OnPush strategy limits
  4. 6:48What is IterableDiffers
  5. 7:31Live coding setup
  6. 9:20Basic IterableDiffers demo
  7. 12:55Employee tracking demo
  8. 15:47TrackBy function explained
  9. 16:53Creating custom structural directive
  10. 25:15Testing custom directive
  11. 26:21Optimizing ngFor complexity
  12. 27:50Summary and key takeaways
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.