InfiniSim icon indicating copy to clipboard operation
InfiniSim copied to clipboard

Slowdown with excess draws

Open Feksaaargh opened this issue 1 year ago • 1 comments

When drawing many times to the screen using Pinetime::Components::LittleVgl::FlushDisplay, Infinisim slows down greatly. This appears when there is in the order of several tens of draws per frame. I've created an example app which shows this here: https://github.com/Feksaaargh/InfiniTime/tree/infinisim-draw-slowdown. This example has 50 5x5px particles, each of which are blanked out and redrawn every 40ms for 2500 draws per second.

https://github.com/user-attachments/assets/3b83db55-9654-43aa-afbf-53b6a31b2563

https://github.com/user-attachments/assets/b4c652ab-de6f-4daf-899a-874bd7bb6685

Feksaaargh avatar Oct 29 '24 06:10 Feksaaargh

This is most likely because of https://github.com/InfiniTimeOrg/InfiniSim/blob/main/sim/displayapp/LittleVgl.cpp#L318 which I introduced to slow down the display transitions to have them look comparable to how they look on the PineTime

  // delay drawing to mimic PineTime display rendering speed
  vTaskDelay(pdMS_TO_TICKS(3));

If you find a better way a PR ist most welcome :)

NeroBurner avatar Oct 29 '24 10:10 NeroBurner