I saw that there is a perfomance degratation due to a for loop used inside the static func harmlessFunction() declared in CustomSelfAwareHelper struct.
This loop is trying to verify the type with the as? operator (that have a complexity of O(n) ) and try to unwrapp the result in order to call the awake() function.
For a medium-larger project (with likely 20k+ classes) that covers old iDevices (like iPhone 5, 5S or 6) this means that the app launch phase could take a lot and should cause crashes if other frameworks needs to do an initialization in the application start up phase .
I saw also that in this project there is only one extension (on Wormholy.swift:109) that implements the type mentioned above (SelfAware): I think it would be nice to replace the for loop with a direct call to the awake() function implemented in the Wormholy externsion.
Hi,
I saw that there is a perfomance degratation due to a for loop used inside the static func harmlessFunction() declared in CustomSelfAwareHelper struct.
This loop is trying to verify the type with the as? operator (that have a complexity of O(n) ) and try to unwrapp the result in order to call the awake() function.
For a medium-larger project (with likely 20k+ classes) that covers old iDevices (like iPhone 5, 5S or 6) this means that the app launch phase could take a lot and should cause crashes if other frameworks needs to do an initialization in the application start up phase .
I saw also that in this project there is only one extension (on Wormholy.swift:109) that implements the type mentioned above (SelfAware): I think it would be nice to replace the for loop with a direct call to the awake() function implemented in the Wormholy externsion.
Let me know
Cheers
Daniele