-
This is indeed a very convenient package especially if you wanna adjust the underlying UIKit Views on SwiftUI, kudos to the devs! but then I was thinking just how efficient this library actually is. In the "How does it work" section it says it will traverse through all the underlying views until it finds the corresponding view. Is there anyone experiencing any lags, or fps drops in large/small projects at all? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is not entirely accurate. The library only traverses a small part of the hierarchy. Specifically, the part of the hierarchy sandwiched between the bottom and top invisible introspection views for a given In addition to the lookup being fast, once the view is found once it's internally cached by the library and accessed directly on subsequent customize calls (e.g. when triggered by view updates). So really, the "heavy" lifting is only performed once per view. |
Beta Was this translation helpful? Give feedback.
This is not entirely accurate. The library only traverses a small part of the hierarchy. Specifically, the part of the hierarchy sandwiched between the bottom and top invisible introspection views for a given
.introspect
modifier. So in reality, the lookup is performed very quickly because there are at most a few dozen views to sift through at any one time.In addition to the lookup being fast, once the view is found once it's internally cached by the library and accessed directly on subsequent customize calls (e.g. when triggered by view updates). So really…