Author Topic: [TUT]Big performance increase on CM7/9  (Read 13782 times)

Offline dhalham

  • Sr. Member
  • ****
  • Posts: 278
  • Reputation: +236/-67
    • View Profile
[TUT]Big performance increase on CM7/9
« on: July 03, 2012, 12:58:32 PM »
So, I've noticed apart from 16 bit transparency, there's another tweak in the later cm7.2 roms of
debug.sf.hw=1
debug.composition.type=gpu

These lines forces GPU to render graphics. In the early gingerbread leak roms debug.sf.hw=1 is the source of a pain for all users, slowing ALL popup animations and lagging them badly, and also rendering the screenoff animation inexistent. The solution was to comment out the line itself.
Later these lines became a standard in Cm7.2 roms. I commented them out anyways, bringing a very slight improvement to performance.

But now, I believe there is a better tweak. Debug.composition.type has 2 settings of gpu or cpu. Out of curiosity I wrote 2 lines into build.prop, in an attempt to make BOTH CPU and GPU to work the graphics.

After rebooting I found that there WAS indeed an improvement in touch response time, and graphics seems to be smoother.

I tested this on many occasions with many roms and found, to my pleasure that there is indeed a difference. Believe me, I spent time STARING at some touch events and I do feel a difference.
So here I recommend you all to do the same.

So all you have to do is add debug.composition.type=gpu to build.prop, underneath that add debug.composition.type=cpu. Reboot and experience a difference.

If you like this press thanks and applaud.
 
[/URL]

Offline oneseven

  • Newbie
  • *
  • Posts: 14
  • Reputation: +14/-0
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #1 on: July 03, 2012, 01:43:19 PM »
Thanks! Testing..... :D

Offline whitexp

  • Newbie
  • *
  • Posts: 46
  • Reputation: +148/-0
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #2 on: July 03, 2012, 09:52:55 PM »
thanks man  :D

Offline richie161cfc

  • Hero Member
  • *****
  • Posts: 871
  • Reputation: +79/-18
  • ROM TESTER & REVIEWER
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #3 on: July 03, 2012, 10:50:59 PM »
dhalham does it need to be applied on d joy os u developed? cause i find it pretty fast as it is.

EDIT: i couldn't wait for ur reply and applied the tweak anyway :P
it works wonderfully!! I can really experience some graphics and cpu acceleration,all games r working smoothly without chainfire!! :D
« Last Edit: July 03, 2012, 11:40:11 PM by richie161cfc »
Testing to find the fastest rom for galaxy 5 8)
1. Speedmod7v2
2. RBF Gingerstockv2
3. Infinite Atlasv2

How to save your END/POWER button!!
press thanks/applaud if i helped :)

Offline dhalham

  • Sr. Member
  • ****
  • Posts: 278
  • Reputation: +236/-67
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #4 on: July 04, 2012, 02:17:17 AM »
:)

Sent from my GT-S5830 using Tapatalk
[/URL]

Offline Ivan39

  • Full Member
  • ***
  • Posts: 221
  • Reputation: +37/-1
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #5 on: July 04, 2012, 04:19:16 AM »
So i need a build prop editor or type the 2 instructions into terminal?
Can you give instructions?
Sorry for my ignorance :-[

Sent from my GT-I5500 using Tapatalk 2

Offline chintan

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 669
  • Reputation: +515/-30
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #6 on: July 04, 2012, 04:53:51 AM »
Hi there
thanks for this

I already notified about some build.prop tweaks quite 3 months a go in cm7.2 thread

check out all the tweaks posted

guys try this into your /system/build.prop settings and check how fast ur phone is?

psyke83 please make corrections, if any.

add this to your build.prop file

ro.ril.disable.power.collapse=1
pm.sleep_mode=1
ro.telephony.call_ring.delay=0
debug.sf.hw=1
video.accelerate.hw=1
debug.performance.tuning=1
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
ro.media.enc.jpeg.quality=100
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
media.stagefright.enable-meta=true
media.stagefright.enable-scan=true
media.stagefright.enable-http=true
media.stagefright.enable-record=false


google it for descriptions :)
CM7.2 v20130613 by psyke83,
All settings defaults by rom
S2E for moving data to sd-ext
no mods :D
I'm on freenode madteam irc chennal #gti5500 & #PhilZ-Touch.

Offline tanpro

  • Newbie
  • *
  • Posts: 38
  • Reputation: +3/-1
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #7 on: July 04, 2012, 07:10:27 AM »
So i need a build prop editor or type the 2 instructions into terminal?
Can you give instructions?
Sorry for my ignorance :-[

Sent from my GT-I5500 using Tapatalk 2

You can open build.prop with any text editor

Offline tanpro

  • Newbie
  • *
  • Posts: 38
  • Reputation: +3/-1
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #8 on: July 04, 2012, 08:08:24 AM »
The tweak seems to have improved the graphics. Animations/transitions have become smoother.
I am running Psyke's CM9.
BTW, any tweak to reduce lag while opening contacts/messages in CM9.
Thanks

Offline motafoca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2516
  • Reputation: +1875/-18
  • WadUthink.com
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #9 on: July 04, 2012, 08:54:35 AM »
Nice

Offline lexobys

  • Sr. Member
  • ****
  • Posts: 296
  • Reputation: +129/-27
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #10 on: July 04, 2012, 10:16:14 AM »
It seems to work in MAD Rom also.

Sent from my blek krupuk

Offline pangadaywalker

  • Full Member
  • ***
  • Posts: 210
  • Reputation: +42/-10
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #11 on: July 05, 2012, 05:45:16 PM »
Unable to edit with the Jota Text Editor. I cannot save...

And what is the MDP in the place we need to put the GPU?

Offline Huncriter

  • Newbie
  • *
  • Posts: 45
  • Reputation: +41/-4
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #12 on: July 05, 2012, 10:09:25 PM »
the biuld prop from cm9 shows debug.composition.type=mdp, what is that?

Offline dhalham

  • Sr. Member
  • ****
  • Posts: 278
  • Reputation: +236/-67
    • View Profile
Re: [TUT]Big performance increase on CM7/9
« Reply #13 on: July 06, 2012, 02:17:56 AM »
Not sure

Sent from my GT-S5830 using Tapatalk
[/URL]

Offline nEnd

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 775
  • Reputation: +590/-21
  • 2 deep n2 the code
    • View Profile
    • SI Community
Re: [TUT]Big performance increase on CM7/9
« Reply #14 on: July 07, 2012, 12:39:52 AM »
debug.sf.hw=1
debug.composition.type=gpu

I don't know, I always like to do some research before I actually use something.

Code: [Select]
    // debug: disable h/w rendering
    char property[PROPERTY_VALUE_MAX];
    if (property_get("debug.sf.hw", property, NULL) > 0) {
        if (atoi(property) == 0) {
            ALOGW("H/W composition disabled");
            attribs[2] = EGL_CONFIG_CAVEAT;
            attribs[3] = EGL_SLOW_CONFIG;
        }
    }

Here is the part in the source this value is checked.

3rd line down says if debug.sf.hw is greater than 0 do this. Without digging further into the source you can see some text there that says "disable h/w rendering" and "H/W composition disabled", which stands for Hardware Rendering and Hardware Composition.

On to the point though, in translation it says if you set this flag higher than 0 you are disabling Hardware Rendering and Hardware Composition. So if I am not wrong by setting this to 1 you have just disabled hardware rendering and enabled software rendering which would be worse than hardware.

I can be wrong though, I haven't really looked into Android source too much.

*edit some more I found

Code: [Select]
    if (property_get("debug.sf.hw", property, NULL) > 0) {
        if (atoi(property) == 0) {
            LOGW("H/W composition disabled");
            attribs[2] = EGL_CONFIG_CAVEAT;
            attribs[3] = EGL_SLOW_CONFIG;
            mFlags |= CPU_COMPOSITION;
        } else {
            // We have hardware composition enabled. Check the composition type
            if (property_get("debug.composition.type", property, NULL) > 0) {
                if(((strncmp(property, "c2d", 3)) == 0) ||
                   ((strncmp(property, "mdp", 3)) == 0)) {
                    // We wish to use c2d or mdp composition. Try opening copybit
                    if (hw_get_module(COPYBIT_HARDWARE_MODULE_ID, &module) == 0) {
                       copybit_device_t* copybit;
                       copybit_open(module, &copybit);
                       if(copybit) {
                           LOGW("C2D or MDP composition");
                           mFlags |= (((strncmp(property, "c2d", 3)) == 0)) ? C2D_COMPOSITION:0;
                           attribs[2] = EGL_CONFIG_CAVEAT;
                           attribs[3] = EGL_SLOW_CONFIG;
                           copybit_close(copybit);
                       }
                    }
                }
            }
        }
    }

Please disregard what I said above was reading the if statement like PHP. The first line is basically checking if the property is set. If it is set then do what is in the if statement. Then it carries on if the value is 0 then hardware composition is disabled. So your right there.

On the else statement, the first if is checking if debug.composition.type is set. If it is set then run the stuff in the if statement. Then it carries on to check the values to see if they match and set accordingly. The values it checks is C2D or MDP.
« Last Edit: July 07, 2012, 01:15:26 AM by nEnd »