Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5fe81ead06933befd1839a98c5fe131594fa4f4c
      
https://github.com/WebKit/WebKit/commit/5fe81ead06933befd1839a98c5fe131594fa4f4c
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-07-18 (Sat, 18 Jul 2026)

  Changed paths:
    M Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js

  Log Message:
  -----------
  HeapSnapshot.js allocates unnecessary intermediate arrays before serializing 
nodes/edges
https://bugs.webkit.org/show_bug.cgi?id=319754
rdar://182605155

Reviewed by Devin Rousso.

instancesWithClassName(), dominatedNodes(), retainedNodes(), and
retainers() each collected raw node/edge indices into an array and
then called .map(this.serializeNode/serializeEdge) to produce the
result, allocating and traversing a throwaway array for no reason.
Push the serialized node/edge directly in the collection loop instead.

* Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot.instancesWithClassName):
(HeapSnapshot.prototype.dominatedNodes):
(HeapSnapshot.prototype.retainedNodes):
(HeapSnapshot.prototype.retainers):

Canonical link: https://commits.webkit.org/317486@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to