Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
hunderteins
Old
(Last edited by hunderteins; 27th April 2012 at 02:52 PM.) Reason: fixing the reference to streakowner
#1  
Senior Member - OP
Thanks Meter 276
Posts: 135
Join Date: Sep 2009
Lightbulb Proposal to set dalvik-vm optimizing all code

Hello,

I played with the dalvik.vm.dexopt-flags in /system/build.prop. Basically you control the class-loading and dalvik-vm there.

streakowner proposed in http://forum.xda-developers.com/show...&postcount=644 the setting v=n,o=v. But disabled this with #, in DSC v1.0 the setting is active.
That means: do not verify and optimize mode verified. Found that info in dexopt/OptMain.c

I did some performance measurement with smartbench 2011 and got the value 553 in the first round, and 465 in the second round. That is very bad for an one ghz powered device. Good would > 1000. /data/dalvik-cache takes 74 MiB with this setting.

At the moment I'm running with

dalvik.vm.dexopt-flags=v=n,o=a,u=y

That means: do not verify, optimize all classes and optimize for uniprocessor.

First I was not impressed, because rebooting with a cleaned dalvik-cache took more than double the time span of the o=v setting. logcat is full off lines telling me what can't be optimized and how much time the load took. But after booting I got the impression the system went faster. With smartbench 2011 I get the value 1036 in the first and 1110 in the second round. /data/dalvik-cache takes 74 MiB with this setting.

Can someone confirm my finding?

I don't say you will double the speed of the streak with this setting. But I think you will notice the change. The trade off is the time for the first boot. But I think that is worth is.
So I propose to use the above setting in all gb-based roms for the streak 5.

Have a nice weekend,
hunderteins
The Following 6 Users Say Thank You to hunderteins For This Useful Post: [ Click to Expand ]
 
_2bad4u_
Old
#2  
_2bad4u_'s Avatar
Senior Member
Thanks Meter 96
Posts: 305
Join Date: Aug 2011
Tested on miui and it's not working i get into a boot loop.
Personal attacks and / or superiority complexes are unconstructive, off-topic and unseemly. I would ask you to try and limited them ... With bowing.
The Following User Says Thank You to _2bad4u_ For This Useful Post: [ Click to Expand ]
 
_n0p_
Old
(Last edited by _n0p_; 27th April 2012 at 03:18 PM.)
#3  
_n0p_'s Avatar
Senior Member
Thanks Meter 1786
Posts: 2,531
Join Date: Apr 2009
Location: Kiev
getprop | grep dexopt
[dalvik.vm.dexopt-flags]: [v=n,o=a,u=y]

Well, same ~950 in Quadrant (CPU/mem only)

998400

--
Sergei.
The Following 2 Users Say Thank You to _n0p_ For This Useful Post: [ Click to Expand ]
 
hunderteins
Old
(Last edited by hunderteins; 27th April 2012 at 05:32 PM.) Reason: did the web page rendering benchmark
#4  
Senior Member - OP
Thanks Meter 276
Posts: 135
Join Date: Sep 2009
Quote:
Originally Posted by _2bad4u_ View Post
Tested on miui and it's not working i get into a boot loop.
Ouch! Sorry to hear that. I hope you didn't get in serious trouble.

Quote:
Originally Posted by _n0p_ View Post
getprop | grep dexopt
[dalvik.vm.dexopt-flags]: [v=n,o=a,u=y]

Well, same ~950 in Quadrant (CPU/mem only)

998400
Quadrant shows 1048 with o=a and 1065 with o=v. Thats not helping either. At least smartbench shows nearly the same "Games Index". But what do they test with ther productivity index? Calculating PI and mandelbrot is so different?
And there is opera. Its definitly faster with o=a. I'll try to find a web page rendering test.

o.k. I get more mixed signals here. Numion tells me that rendering a real world web-page is about 30% faster with o=a (10.5 vs. 14,6 sec). Scragz is 10 % slower with o=a ( 9.7 vs. 10.5 sec).

I'll file it under works for me, but don't try this with miui. Thanks for your help.

Reg. hunderteins
Attached Thumbnails
Click image for larger version

Name:	quadrant_o_v.jpg
Views:	577
Size:	25.9 KB
ID:	1027527   Click image for larger version

Name:	quadrant_o_a.jpg
Views:	512
Size:	26.0 KB
ID:	1027528   Click image for larger version

Name:	smartbench_o_v.jpg
Views:	464
Size:	21.3 KB
ID:	1027536   Click image for larger version

Name:	smartbench_o_a.jpg
Views:	417
Size:	20.8 KB
ID:	1027543   Click image for larger version

Name:	numion_o_v.jpg
Views:	391
Size:	42.1 KB
ID:	1027608  

Click image for larger version

Name:	numion_o_a.jpg
Views:	369
Size:	44.1 KB
ID:	1027609   Click image for larger version

Name:	scragz_o_v.jpg
Views:	366
Size:	43.7 KB
ID:	1027611   Click image for larger version

Name:	scragz_o_a.jpg
Views:	353
Size:	42.9 KB
ID:	1027612  
The Following 3 Users Say Thank You to hunderteins For This Useful Post: [ Click to Expand ]
 
_2bad4u_
Old
#5  
_2bad4u_'s Avatar
Senior Member
Thanks Meter 96
Posts: 305
Join Date: Aug 2011
No problem happy to help
Personal attacks and / or superiority complexes are unconstructive, off-topic and unseemly. I would ask you to try and limited them ... With bowing.
 
_n0p_
Old
#6  
_n0p_'s Avatar
Senior Member
Thanks Meter 1786
Posts: 2,531
Join Date: Apr 2009
Location: Kiev
hunderteins, this actually lead me to think that you'll try to build highly optimized (armv7, neon, no loop unroll - small cache) libdvm. Am I right?
 
sinan33
Old
#7  
Senior Member
Thanks Meter 118
Posts: 519
Join Date: Mar 2010
Location: Tarsus

 
DONATE TO ME
Quote:
Originally Posted by _2bad4u_ View Post
Tested on miui and it's not working i get into a boot loop.
It works with MIUI too but you have to delete the another line that contains

dalvik.vm.dexopt-flags=m=y

i guess this lines value is overlapping with the other lines "u=y" value.

---------- Post added at 08:11 AM ---------- Previous post was at 08:03 AM ----------

The result of first test is:
Productivity index=716
Gaming index=981

with smart bench 2012

---------- Post added at 08:20 AM ---------- Previous post was at 08:11 AM ----------

The result of second test is:

Productivity index=1074
Gaming index=1569

with smart bench 2011
 
sinan33
Old
#8  
Senior Member
Thanks Meter 118
Posts: 519
Join Date: Mar 2010
Location: Tarsus

 
DONATE TO ME
DS 5 works faster than ever!

Thank you!
 
cdzo72
Old
#9  
Senior Member
Thanks Meter 576
Posts: 2,026
Join Date: Mar 2011
Location: Heredia

 
DONATE TO ME
Quote:
Originally Posted by hunderteins View Post
Hello,

I played with the dalvik.vm.dexopt-flags in /system/build.prop. Basically you control the class-loading and dalvik-vm there.

streakowner proposed in http://forum.xda-developers.com/show...&postcount=644 the setting v=n,o=v. But disabled this with #, in DSC v1.0 the setting is active.
That means: do not verify and optimize mode verified. Found that info in dexopt/OptMain.c

I did some performance measurement with smartbench 2011 and got the value 553 in the first round, and 465 in the second round. That is very bad for an one ghz powered device. Good would > 1000. /data/dalvik-cache takes 74 MiB with this setting.

At the moment I'm running with

dalvik.vm.dexopt-flags=v=n,o=a,u=y

That means: do not verify, optimize all classes and optimize for uniprocessor.

First I was not impressed, because rebooting with a cleaned dalvik-cache took more than double the time span of the o=v setting. logcat is full off lines telling me what can't be optimized and how much time the load took. But after booting I got the impression the system went faster. With smartbench 2011 I get the value 1036 in the first and 1110 in the second round. /data/dalvik-cache takes 74 MiB with this setting.

Can someone confirm my finding?

I don't say you will double the speed of the streak with this setting. But I think you will notice the change. The trade off is the time for the first boot. But I think that is worth is.
So I propose to use the above setting in all gb-based roms for the streak 5.

Have a nice weekend,
hunderteins


Sent from my Dell Streak using Tapatalk 2
 
HP TouchPad 32gb
Unofficial CM10 Preview 03/04

Samsung Galaxy S III i9300 - NEAT ROM XXEMC2 Lite v4.0
Siyah Kernel v1.8.9
 
Strephon Alkhalikoi
Old
#10  
Strephon Alkhalikoi's Avatar
Senior Member
Thanks Meter 265
Posts: 1,032
Join Date: Aug 2010
Testing this now. Opera Mobile is definitely faster, and I honestly think the start time from a wipe of the dalvik cache wasn't any longer than normal.
Noob FAQ
Q: Can someone suggest a link I can follow that will walk me through the root process for this phone?
A: Simple answer is no. Do your homework. No spoonfeeding here. Check the stickies and the search engine. You'll find it soon enough.

My Downloads: Stargate Boot Animation | ICS-style Theme for DSC (Updated 3/27) | MultiFlasher

 
Post Reply+
Tags
dalvik-vm, optimize
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...