Announcement

Collapse
No announcement yet.

Watchface - onPartialUpdate - PowerBudgetExceeded

Collapse
X
  • Time
  • Show
Clear All
new posts

  • Watchface - onPartialUpdate - PowerBudgetExceeded

    I do not know how to calculate the time budget in function onPartialtUpdate. Currently I call dc.fillPolygon 5 times and the budget exceeds:
    Average execution time: 50.446846
    Allowed execution time: 30.000000

    Why is fillPolygon (with 4 Point) so expensive?

  • #2
    There is a window in the simulator that breaks down your power usage. File->"View Watchface Diagnositcs"

    Your power usage is broken down into 3 parts there.

    Execution Time: This is the partial update time attributed to your execution on the VM. This will be Roughly correlated with the number of lines of code executed.

    Graphics Time: This is the time the system sent rendering graphics objects. It is the cost of the Dc.draw* or Dc.fill* calls you used.

    Dispaly Time: This is the time the hardware requires to output the portions of the display you changed to the display hardware. You must use Dc.setClip() to tell the system what you are changing.


    Based on the value you are receiving here. I suspect you are not using Dc.setClip to clip your rendering. The system saves power on watchfaces by only sending modified data to the display. The number of pixels that are updated significantly impacts the power draw of a watchface. Any pixel that is not clipped when any Dc.draw* or Dc.fill* call is made will be assumed dirty.

    Comment


    • #3
      Brian beat me to it!

      Not setting the proper clip region was my guess...
      Last edited by jim_m_58; 10-04-2018, 08:16 AM.
      My Connect IQ Apps in the Store
      Facebook - Instagram -
      Twitter

      Comment


      • #4
        Diagnositcs:
        - Total time 50447
        - Display time 45344

        Looks you are right and I have to work with clip technic.

        Thank you very much for the fast apposite answer!!!

        Comment


        • #5
          You want to use dc.setClip() for only the region of the screen you will be updating, and want to also make sure you call dc.clearClip() before you update the whole screen with a call to onUpdate().
          My Connect IQ Apps in the Store
          Facebook - Instagram -
          Twitter

          Comment


          • #6
            I get it :-)

            Diagnositcs:
            - Total time 14331
            - Display time 4160

            This is a very big difference!!!

            Thank you to all for supporting me.

            Comment


            • #7
              Hello,

              can i get der PowerInfo (executionTimeAverage) during the onPartialUpdate or only in the "WatchFaceDelegete" Method "onPowerBudgetExceeded(powerInfo)" ?

              thanks

              Comment


              • #8
                Only in the delegate, but in the sim you can keep an eye on what's happening with View Watchface Diagnostics. (see post #2 in this thread)
                My Connect IQ Apps in the Store
                Facebook - Instagram -
                Twitter

                Comment

                Working...
                X