Is the method addSubview of NSView inherently slow? (Cocoa OSX)

Posted by Michael Minerva on Stack Overflow See other posts from Stack Overflow or by Michael Minerva
Published on 2010-03-12T19:50:41Z Indexed on 2010/03/13 6:35 UTC
Read the original article Hit count: 263

Filed under:
|
|
|

I am trying to speed my gui that loads very slow slow when I am loading a large project (the gui is a representation of groups and sub groups and is made up of many views). During this process I was looking at how long certain code segments take to execute and I have found that a call to addsubview is taking between 10 and 20 milliseconds most of the time. The subview I was looking at is a disclosure button. I am wondering if this method is just inherently slow or is their some other factor at work here? Is the time it takes to add the subview dependent on the complexity of the subview or is that not a factor? Also, is there some other method that can be used to add a subview that might be faster?

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about osx