The throttling is simply a side effect of v-sync. Every paint request
is synced with the display's refresh rate. This means you can only
draw every ~16 milliseconds (== 60 fps.) Of course, if your
application cannot draw in 16 ms you will be synced every 2 frames and
you will fall to 30 fps.

On Sun, Oct 14, 2012 at 2:08 PM, Adam Ratana <[email protected]> wrote:
> Hi Romain,
>
> If you don't mind, would you please describe how the implicit throttling
> mechanism works, or, point to any documentation on it?
>
> I think I am running into this, when my activities start, and the view is
> being invalidated often, it is throttled it seems for a little while (5-10
> seconds?).
>
> After what seems to be an initial throttling, all is fine and I am seeing
> good frame rates.
>
> Some of my activities do a lot of of canvas drawing (using the HW
> accelerated rendering) triggered by sensor updates, and since JB I believe
> I've seen this throttling when the activity starts.  I'd love to avoid this,
> while still getting 30fps+ when necessary.  I could be wrong but it also
> seems the throttling is more prevalent/present if text is being drawn using
> canvas.drawText, but have not yet dug deeper into experimenting and figuring
> out how I can trigger or not trigger the throttling.
>
> Adam
>
> On Thursday, October 11, 2012 5:41:08 PM UTC-4, Romain Guy (Google) wrote:
>>
>> There is an implicit throttling mechanism as of 4.1 but even then it's
>> bad. If you don't need to draw, don't draw. You're going to waste
>> battery.
>>
>> On Thu, Oct 11, 2012 at 2:34 PM, bob <[email protected]> wrote:
>> > As you may know, you can create a View subclass and then call
>> > invalidate()
>> > at the end of the painting method.
>> >
>> >
>> > This produces continuous updating.
>> >
>> >
>> > Is this really really bad?
>> >
>> >
>> > It sure is attractive due to its simplicity.
>> >
>> >
>> > However, there is no explicit throttling mechanism, which can be an
>> > issue if
>> > there is also no implicit one.
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to [email protected]
>> > To unsubscribe from this group, send email to
>> > [email protected]
>> > For more options, visit this group at
>> > http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>> --
>> Romain Guy
>> Android framework engineer
>> [email protected]
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Romain Guy
Android framework engineer
[email protected]

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to