How to handle direct drawing on screen using LVGL? Custom object?

Few days ago I decided to build GUI for my device using LVGL. Currently I successfully create screen, some buttons, mouse pointer etc. In my project I want to draw in real time (30FPS or AFAP) on screen some interface related to my IMU. I tried to use canvas but it require too much ram. Then can I use somehow LVGL to reporoduce similar effect or I need engage LVGL gui and “direct drawing” by some custom object and draw in some callback? Or at least ensure direct drawing area will not overlap other GUI elements?

PS. Im new in LVGL and I can see v8.0 is quite new and not compatible with older versions. Then should I focus on learning v8 or something more stable like v7?

my board: TTGO T-DISPLAY (ESP32)
screen resolution: 320x240
driver: eSPI
LVGL version 8.0.1

currently my drawing code look like this:

void drawLevel(float X,float Y,float Q){
      float len = sqrtf(X*X+Y*Y);
      Q = 1;
      int w = tft.width();
      int h = tft.height();
      int r = (((w<h?w:h)|1)/2)-1;
      int x = w-r-1;
      int y = h-r-1;
      int L = x-r;
      int R = x+r;
      int U = y-r;
      int D = y+r;
      float qy = mapf(X,-Q,Q,U,D);
      float qx = mapf(Y,-Q,Q,L,R);
      int qr = 9;
      uint32_t drawingTime = micros();
      static eSPI_autoErase o[32]; // auto erase old figure before new draw
            o[8].drawCircle(x,y,r,0x555555,0x000000); // statyczna podziaka
            o[0].drawLine(L,y,x-qr,y,0x555555,0x000000); // statyczna podziaka
            o[1].drawLine(R,y,x+qr,y,0x555555,0x000000); // statyczna podziaka
            o[2].drawLine(x,U,x,y-qr,0x555555,0x000000); // statyczna podziaka
            o[3].drawLine(x,D,x,y+qr,0x555555,0x000000); // statyczna podziaka

            o[9].drawLine(x,y,qx,qy,0xFF2200,0x000000); // linia do punktu

            o[10].drawCircle(qx,qy,qr,0xFFFFFF,0x000000); // oczko

            o[4].drawLine(L,y,qx-qr,qy,0xffffff,0x000000); // linie oczka
            o[5].drawLine(R,y,qx+qr,qy,0xffffff,0x000000); // linie oczka
            o[6].drawLine(x,U,qx,qy-qr,0xffffff,0x000000); // linie oczka
            o[7].drawLine(x,D,qx,qy+qr,0xffffff,0x000000); // linie oczka

      drawingTime = micros()-drawingTime;

I haven’t used a canvas before, but it should be possible with a canvas:

Sorry, overseen, you are using a canvas already. The canvas always copy the drawing area into the screen and needs ram for the area. So the need for ram wil remain, and the speed depends on the driver and the display interface.

just wondering if you had any success with this?

I am currently using a canvas to display on a x/y graph the position of a joystick. This seems to work fine at slow polling rate but as soon as the joystick moves faster I just have what appear random pixels on the canvas.

I am using LVGL 8.0 on a ESP32 with 8MB PSRAM (WT32-SC01).

Look at the people doing large dataset charts, they get told to use canvas, and then to consider partial updates / not auto-erasing the whole screen, as you can blank just areas of the screen etc to save ram (that’s what I got from one thread). Or consider another chip/board, like maybe getting the S3R8. This has 8mb-psram 16mb-flash T-Display-S3 – LILYGO®