You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
Hi there, thanks for this fantastic lib, it's very useful and the code is very impressive. I really want to put concrete protocol into my project, however, I found some performance issue(this lib looks like not maintained, but why don't we just discuss this issue here).
I checked the implementation of the concrete protocol function, and I found when loading concrete protocols, a lot of time will spent on traversing all Objc classes for making protocol connected target class automatically. I have a test in an almost empty project, and we will got more than 13000 classes in the system foundation. it will take very long time to load all the concrete protocols.
In this simple test, I create 100 concrete protocols, more than 1.20s will spent on loading phase, it will be worse when we actually use it in a real project.
So there is my solution, create a concreteprotocol2 macro to all the specific target classes(just increase a little bit writing complexity for making such a great high performance).
Hi there, thanks for this fantastic lib, it's very useful and the code is very impressive. I really want to put concrete protocol into my project, however, I found some performance issue(this lib looks like not maintained, but why don't we just discuss this issue here).
I checked the implementation of the concrete protocol function, and I found when loading concrete protocols, a lot of time will spent on traversing all Objc classes for making protocol connected target class automatically. I have a test in an almost empty project, and we will got more than 13000 classes in the system foundation. it will take very long time to load all the concrete protocols.
In this simple test, I create 100 concrete protocols, more than 1.20s will spent on loading phase, it will be worse when we actually use it in a real project.
So there is my solution, create a
concreteprotocol2
macro to all the specific target classes(just increase a little bit writing complexity for making such a great high performance).for example:
That will drop the traversing code, and take less than 1ms to load all the 100 concrete protocols.
The text was updated successfully, but these errors were encountered: