-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[factory registerDefinition:] method is slow #325
Comments
To harzard a guess, it sounds like a full load/unload cycle is happening for each registration. |
Probably true. I am debugging the code. In every case after registerDefinition method has been called, it reloads all registered components and calls the [TyphoonFactoryAutoInjectionPostProcessor postProcessDefinitionsInFactory:] method. |
Please try again with |
Temproary reverted back, since it's fail tests. Have to do some refactoring on Typhoon Core for that. Hope I'll do that soon (maybe at weekends) |
I have an tip for optimize the code. I removed some cycles from code. The unit test runs correctly and it will be faster. But I can't solve the reload problem and don't understand how solved the circular dependencies this code. I uploaded my changes here. |
@alexgarbarev Do you want to review this suggestion? |
I updated my solution. I cached the injected properties for classes. In my case this solution loads components about 4,6-4,8 seconds on iPhone 5. |
How about send a pull request, and we can try it out on the main branch for a few days, on current projects. If ok, let's push 3.0.3 |
Merged to master. Try to find any issues. If all good push 3.0.4 To test: pod 'Typhoon', :head |
I tested it. It works. |
@warnyul Sorry for delay. This is now available at CocoaPods mater repo as Typhoon 3.1.0 |
I has increased the typhoon version in my project to 3.0.1 and the [factory registerDefinition:] will be slower and slower, when the registry array count is increasing. I tried register more than 400 TyphoonDefinitions. The execution time of this method increased to 0.5-0.8 seconds in simulator. Start time of iOS application will be more than 1 minute.
The text was updated successfully, but these errors were encountered: