Esp32 driver LVGL scrolling TAB pages is slow and not smooth

Code

The code block(s) should be between ```c and ``` tags:

    lv_obj_t *tv = lv_tileview_create(parent);
    lv_obj_add_style(tv, &default_style, 0);
    lv_obj_set_style_bg_opa(tv, LV_OPA_0, 0);
    lv_obj_set_size(tv, LV_PCT(100), 300 * PLOTTING);
    lv_obj_align_to(tv, Slogan_lable, LV_ALIGN_OUT_BOTTOM_MID, 0, 0);
    lv_obj_clear_flag(tv,LV_ANIM_OFF);

    lv_obj_set_scrollbar_mode(tv, LV_SCROLLBAR_MODE_OFF);
    // lv_obj_set_style_bg_color(tv, lv_color_black(), 0);

    /*Tile1: just a label*/
    lv_obj_t *tile1 = lv_tileview_add_tile(tv, 0, 0, LV_DIR_RIGHT);
    lv_obj_t *tile2 = lv_tileview_add_tile(tv, 1, 0, LV_DIR_HOR);

    lv_obj_add_event_cb(tv, Home_tile_evevt_cb, LV_EVENT_VALUE_CHANGED, &tile_index);

    //===================================================
    lock_state(tile1);
    //===================================================
    function_switch(tile2);
    //===================================================`

tags
When using the tielView component to implement page scrolling, the page back is slow. How to optimize and adjust it?

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

Scrolling is slow because LVGL needs to send the whole picture again to the screen multiple time (for each scroll position) and the SPI bandwidth on ESP32 doesn’t allow you to do that at realtime framerate.

You might improve the experience if you:

  1. Increase the SPI clock speed (you might already be on maximum speed)
  2. Implement a driver for the scroll feature if your display support it (like the ST7796, it has a scroll function). Typically, instead of sending the whole screen again, you’ll only need to send the changed lines (on top or bottom depending on scroll direction). That doesn’t work for horizontal scrolling, obviously.
  3. Change your GUI behavior to disable scrolling. Split in multiple page and have buttons to switch pages at once. The page will still take time to completely render, but it’ll happen once.