From ce7e5122e065c78cfa446f4a6b498bd2d73b428d Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Sun, 24 Feb 2013 17:36:30 +0000 Subject: [PATCH] Fixes #829. Improve - CPView removeFromSuperview performance. In the modified test described in #829 performance improves by at least 30% and that's with a significant addSubview: component diluting the test. This change should improve outline and table view performance. --- AppKit/CPView.j | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AppKit/CPView.j b/AppKit/CPView.j index d309b0b4f..19431429a 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -565,10 +565,10 @@ var CPViewFlags = { }, [_superview willRemoveSubview:self]; - [_superview._subviews removeObject:self]; + [_superview._subviews removeObjectIdenticalTo:self]; #if PLATFORM(DOM) - CPDOMDisplayServerRemoveChild(_superview._DOMElement, _DOMElement); + CPDOMDisplayServerRemoveChild(_superview._DOMElement, _DOMElement); #endif _superview = nil;