The most frustrating part is that even if object count is small, it expands slowly. This is because for every class we iterate through all nodes.
Created attachment 92072 [details] patch
Manually committed http://trac.webkit.org/changeset/85642 2011-05-03 Mikhail Naganov <mnaganov@chromium.org> Reviewed by Pavel Feldman. WebInspector: [Chromium] Fix slowness of Summary view nodes expansion in detailed heap profiles. https://bugs.webkit.org/show_bug.cgi?id=60023 * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotConstructorNode): (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype.dispose): (WebInspector.HeapSnapshot.prototype.aggregates): (WebInspector.HeapSnapshot.prototype._buildAggregates): (WebInspector.HeapSnapshot.prototype._sortAggregateIndexes): (WebInspector.HeapSnapshot.prototype.createNodesProviderForClass): (WebInspector.HeapSnapshotFilteredOrderedIterator): (WebInspector.HeapSnapshotNodesProvider): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotProxy.prototype.aggregates): (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForClass):