简体   繁体   中英

How much cpu does an Android App need to consume to be cpu-intensive?

I need to write a few cpu-intensive Android applications. One I have already coded is a BigInteger factorial but it consumes totally around 30-40% of my cellphone cpu. My phone is hexa-core and the cpu-usage is about 5% kernel and 30% user. Is this enough for a cpu intensive application or should the percentage be very high like 80-90%? It also consumes about 120MB memory out of the available 260MB. Is that fine or it must be very low?

Hmmm. This is both a straightforward question and a tricky question. First off, 30%-40% is not that CPU intensive; actually, it's pretty wimpy. I'm guessing that one of two things is happening: (1) your application isn't running enough threads to keep all the cores fat and happy, or (2) the OS has some built in governors to keep any given app from dragging down the phone, making it pretty much useless and giving the manufacturer a very bad name. (By the way, I don't know if the developers implement (2) or not. If I was the designer, I would.)

Is your app an android compliant Java application? Or are you running closer to the metal?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM