0.96" 128x64px OLED takes to much time in to refresh in loop

Hello guys!

I habe an 128x64 display with some data showing up in my build and have also some data to transfer over an RF69 433mHz Chip.
The transmission and receive time for the RF69 is less than10ms, but to update the display with some stuff takes around 100ms.

void updateMainDisplay()

void loop() {

  transmitToReceiver();


  updateMainDisplay();

}

void updateMainDisplay() {

  u8g2.firstPage();

  do {
      drawSomething();
      drawSomethingElse();
      drawSomethingElse();
      drawSomethingMore();
      drawSomethingMore();
  } while ( u8g2.nextPage() );
}
....

the more i draw, thelonger it takes to update the OLED and my cycle time goes up. Is there any chance to make the transmitToReceiver function parallel to the updateMainDisplay or to transmit the data many times while the display is updating?

Transmit data is absolut priority...

regards,
Stefan

If there is sufficient RAM, you could use a full buffer constructor for u8g2.

Another option is to unroll the refresh loop:

// NOT TESTED
void updateMainDisplay() {
  static int is_first_required = 1;

  if ( is_first_required )
  {
    u8g2.firstPage();
    is_first_required = 0;
  }

  drawSomething();
  drawSomethingElse();
  drawSomethingElse();
  drawSomethingMore();
  drawSomethingMore();

  if (   u8g2.nextPage()  == 0 )
    is_first_required = 1;
}

This will greatly slow down the display refresh speed, but may hopefully leave more time for test of the code.

Oliver