Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

Reflection Performance #80

Closed
erikjhordan-rey opened this issue Aug 20, 2016 · 3 comments
Closed

Reflection Performance #80

erikjhordan-rey opened this issue Aug 20, 2016 · 3 comments
Labels

Comments

@erikjhordan-rey
Copy link

erikjhordan-rey commented Aug 20, 2016

Hi guys, I've been reading several articles on how and when to use reflection as well as I have also read that it can cause many problems in an application performance so too I have been studying this repository and I think Rosie Framework is an excellent contribution but I have some questions about the use of reflection So far I've seen two uses @usecase and @presenter .

How Rosie Framework affect applications performance with the reflector use?
Did you do any test performance?

Thank you for your great contributions!

I've really learned a lot thank you !!

@flipper83
Copy link
Member

Hi @erikcaffrey I did some performance tests, and the time consumed by reflection is insignificant. Reflection can affect the performance is you are doing for each run cycle or with a lot of object. In this case is for find a field when the activity has been created and when you invoke a useCase, if you are invoking a use case each few time the problem could be other.

The solution is use code generation annotations. We can move it to this solution in a future, but it's not in the pipeline right now.

If you want make some performance test it's really easy, calculate the difference with System.nanotimes, after and before to search the use case, and this is the time spent in reflection.

@erikjhordan-rey
Copy link
Author

erikjhordan-rey commented Aug 24, 2016

Oh!! I get it thanks for your answer Jorge @flipper83 !

Thank you for your great contributions!

@pedrovgs
Copy link
Contributor

You are welcome @erikcaffrey :) As this question seems to be answered I'm closing this issue :) Thank you so much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants