Guest Paul Posted April 5, 2011 Report Posted April 5, 2011 You might not have seen my main post on my Performance Audit, so I thought i'd post a seperate topic. Basically i've been auditing the LG ROMs for performance tweaks today, and I came across a monstrous screw up by LG! On device startup there is a piece of code which looks to check if the device is running an engineering build (this is set in the build.prop). If it is, then it sets up the system as such that dexopt doesn't happen at startup (which is normal), but happens on the fly. This is fine for engineering builds, but for user builds, it's a huge and unpredictable system overhead. Now, in my audit I discovered that LG have manually changed this code to always return 'true' instead of looking at the build.prop! So the device always runs it's dexopt in engineering mode (no pre-dexopt). Crazy! This explains the slowdowns and random weirdness we have been seeing. I've reversed 3 LG builds and they all have this problem. I've now fixed it and i've implemented the fix in my Fr7 releases but, well, bad LG! :D P PS For the techies amongst you, let me post the code snippets below. The 'stock' Google code (smali): const-string v5, "eng" const-string v6, "ro.build.type" invoke-static {v6}, Landroid/os/SystemProperties;->get(Ljava/lang/String;)Ljava/lang/String; move-result-object v6 invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v5[/code] LG's code (smali): [code] const/4 v5, 0x1 LMAO! B)
Guest sibbor Posted April 5, 2011 Report Posted April 5, 2011 (edited) I hope LG sees this and fixes it in an upcoming official build. They should be embarrassed ;-) Perhaps they should create a pre-release TODO list and include this issue on it. Edit: I'm back here to thank you once again, P. This fix made the phone smooth as butter. Geez, what a different! Thanks for you quick prebakes... running Fr7 since a few hours, without any issues. Edited April 5, 2011 by sibbor
Guest wapz Posted April 5, 2011 Report Posted April 5, 2011 Cool Paul. Will install Fr7 now and check it out. Would you be able to also merge to overclocking options from Cpasjuste (XDA) into your kernal? Or release your sources to him so he can make the changes himself? That would be great :D
Guest Korumera Posted April 5, 2011 Report Posted April 5, 2011 I can code a bit but everybody can see that the stock code is better then the LG version tho :D I indeed hope they will fix this before the release GB to the general population B).
Guest Paul Posted April 5, 2011 Report Posted April 5, 2011 Cool Paul. Will install Fr7 now and check it out. Would you be able to also merge to overclocking options from Cpasjuste (XDA) into your kernal? Or release your sources to him so he can make the changes himself? That would be great :D Yes, i'll be posting my kernel sources to my github. P
Guest djmcnz Posted April 5, 2011 Report Posted April 5, 2011 They paid their devs by the keystroke. LG's is clearly byte-optimised code! :0
Guest Frank Sem-Jacobsen Posted April 5, 2011 Report Posted April 5, 2011 So what is the effect of this in layman's terms? Will it only affect the first run of an application, or every time an application is launched, leading to general instabilities?
Guest Paul Posted April 5, 2011 Report Posted April 5, 2011 I saw it doing it for apps multiple times, at weird times... which is kinda odd. I was doing something in one app, and i'd see it generate dex for Dolphin Browser in the background for example. Very weird. P
Guest djmcnz Posted April 5, 2011 Report Posted April 5, 2011 So what is the effect of this in layman's terms? Will it only affect the first run of an application, or every time an application is launched, leading to general instabilities? I think it's explained pretty well in layman's terms in the first post... Instead of taking a hit at boot, LG had set it to carry an overhead during normal use. Kind of the wrong way around.
Guest SilentInfidel Posted April 5, 2011 Report Posted April 5, 2011 Is there any possibility that this change was done deliberately as a work-around for some kind of bug that couldn't be fixed in time for release, such as a race condition? This is the first dual-core Android device after all. Of course I don't have any evidence of this, and I'm just trying to think of why LG might have done it.
Guest djmcnz Posted April 5, 2011 Report Posted April 5, 2011 (edited) Is there any possibility that this change was done deliberately as a work-around for some kind of bug that couldn't be fixed in time for release, such as a race condition? This is the first dual-core Android device after all. Of course I don't have any evidence of this, and I'm just trying to think of why LG might have done it. We'll find out in a few hours/days! But for sure the hw was clearly ready before the sw, the price you pay for trying to be #1 I suppose. And to be fair, at least they didn't have time to encrypt the bootloader lol! I just think the CEO got one and said - "this takes too long to boot, fix it" - and they did... :D Edited April 5, 2011 by djmcnz
Guest Paul Posted April 5, 2011 Report Posted April 5, 2011 Is there any possibility that this change was done deliberately as a work-around for some kind of bug that couldn't be fixed in time for release, such as a race condition? This is the first dual-core Android device after all. Of course I don't have any evidence of this, and I'm just trying to think of why LG might have done it. No. And it's not the first DC device. The Vega has very similar architecture and doesn't do this. P
Guest d-droid Posted April 5, 2011 Report Posted April 5, 2011 Wow, truly amazing they would miss such a thing. Have you contacted them in any way? I suppose a tweet directing them here would do no good since marketing seldom are very techie but I'll try! :D
Guest gensplejs Posted April 5, 2011 Report Posted April 5, 2011 I hope you have some contacts with LG so they can fix some of the s*** they missed in the official Gingerbread release....
Guest Stryke69 Posted April 6, 2011 Report Posted April 6, 2011 (edited) LOL. Nice job Paul (as always)! I really wonder why some people get paid for a job that others do much better in their freetime... Edited April 6, 2011 by Stryke69
Guest Bay Harbor Butcher Posted April 6, 2011 Report Posted April 6, 2011 (edited) A friend of mine with italian LG dual,has a bad problem when phone is charging. Sometimes,during the charge, he wants to use phone but it doesn't work and it appears to be off. He need to remove battery and then it boots. Does FR7 fix this issue?Searching in the web he's not the one with this problem.. Thanks.. Edited April 6, 2011 by Bay Harbor Butcher
Guest jivemaster Posted April 6, 2011 Report Posted April 6, 2011 A friend of mine with italian LG dual,has a bad problem when phone is charging. Sometimes,during the charge, he wants to use phone but it doesn't work and it appears to be off. He need to remove battery and then it boots. Does FR7 fix this issue?Searching in the web he's not the one with this problem.. Thanks.. I would be greatly interested too if this fixes the random reboot issue. My wife's 2x reboots itself 1-2 times a day, and she sometimes pulls the phone out of her bag only to be welcomed by the black screen of death.
Guest rex1701 Posted April 6, 2011 Report Posted April 6, 2011 A friend of mine with italian LG dual,has a bad problem when phone is charging. Sometimes,during the charge, he wants to use phone but it doesn't work and it appears to be off. He need to remove battery and then it boots. Does FR7 fix this issue?Searching in the web he's not the one with this problem.. Thanks.. No he isn't - only seen it once though - at least up until now... /Rex
Guest Batkoto Posted April 6, 2011 Report Posted April 6, 2011 I would be greatly interested too if this fixes the random reboot issue. My wife's 2x reboots itself 1-2 times a day, and she sometimes pulls the phone out of her bag only to be welcomed by the black screen of death. Which ROM version is your wife's 2X running. Stock or custom?
Guest jivemaster Posted April 6, 2011 Report Posted April 6, 2011 (edited) Which ROM version is your wife's 2X running. Stock or custom? Just stock 2.2.2 rom from the factory. No root. Edited April 6, 2011 by jivemaster
Guest utp Posted April 7, 2011 Report Posted April 7, 2011 (edited) Hi Paul: I am on 10a, ro.build.date.utc 1299570033, HK/TW stock rom. If I would like to look into the problem, which file and where abouts should I start looking at? wonder would you mind share more info on the change? Thanks a lot. Edited April 7, 2011 by utp
Guest Lucky-Strike Posted April 7, 2011 Report Posted April 7, 2011 (edited) Hi ! First, thx Paul for your work. Then, I have a question that might seems stupid/naïve, but I have to ask : have you any kind of contact with anybody at LG's ? 'Cause your work is really great, but they should clean their own mistakes by themselves, so that kind of issue needs to be noticed to them... Moreover, some dev's email adress are in the code :D Anyway, thx again. Edited April 7, 2011 by Lucky-Strike
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now