Skip to content
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

Performance #6

Open
vilius-kraujutis-ht opened this issue Sep 30, 2018 · 1 comment
Open

Performance #6

vilius-kraujutis-ht opened this issue Sep 30, 2018 · 1 comment
Labels
question Further information is requested

Comments

@vilius-kraujutis-ht
Copy link

How is the performance of this library? Is it fast? Does it increase screen rendering time?

@JcMinarro
Copy link
Owner

Hello @vilius-kraujutis-ht

I have not measured the performance of the lib, but it shouldn't decrease it.
There are two ways where Philology is called:
1-. From code when you do something like getResources().getString(R.string.label)
2-. Every time you inflate a view, a transformer for that kind of view has been added to Philology and an string resource has been assigned on the xml file

The first case it works only as a proxy: if the value of R.string.label is in Philology use it, in another case delegates it on the Android System. The performance here is almost the same than if you don't use Philology

The second case could spend a bit more, because for every view Philology check if there is a transformer (It is O(1) because the implementation is a HashMap) and on an affirmative case read xml text attribute to use the most updated value of it.

One last point, Philology itself, because of the previous points, doesn't decrease the performance of your apps, but it could impact on performance if the injected dependencies (PhilologyRepositoryFactory, PhilologyRepository, ....) have an expensive runtime implementation

@JcMinarro JcMinarro added the question Further information is requested label Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants