-
Notifications
You must be signed in to change notification settings - Fork 306
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
Not so Fast with the Nexus 6P #159
Comments
I confirm what LuigiPapino says, the issue seems present since android Lollipop. |
I think the issue isn't that LoganSquare is slow, but that Android has maybe increased reflection performance. I can't know for sure, though! |
Also keep in mind the implementation of String and the underlying char[] was optimized in api 23 which could further reduce differences. |
Why JSON processing use Jsckson. |
@chenfei0928 because it uses jackson core streaming api |
it would be also nice to test with Jackson-jr (https://github.com/FasterXML/jackson-jr) |
I also suggest that it is not slowing down of this library as much as likely speed up of some aspects of Android's SDK. Reflection improvements, as mentioned, would be a huge deal -- Android reflection performance has been really, REALLY bad, and lead to unfortunately high startup times for Jackson (even where Jackson's newer versions try to reduce amount of work done upfront). |
AndroidEngTeam replied this about reflection in M and N:
|
Very cool. This should help a lot with libraries that rely on reflection. I wonder if there could also be similar improvements to annotation access, which is something that has been slow as well, and possibly due to similar reasons (access to annotation information uses reflection(-like) functionality heavily). |
Compile-time annotations don't use any reflection and can't really be optimized. They just end up as code in the app. |
@EricKuck I understand, but I was referring to runtime annotations (which LS probably doesn't use, but others like Jackson and GSON do). |
I did some tests and found that on recent phones, like the Nexus 6P, LoganSquare doesn't result so fast in comparison with GSON and specially Jackson.
Anyone else with this problem, or a device related issue?
Nexus 6P API 23
Samsung S5 API 21
The text was updated successfully, but these errors were encountered: