SerialEvent() data losing when Timer1 ISR is running

Hello, I have an arduino code with below sections.

Section I

void Setup()
{
cli();
TCCR1A = 0;
TCCR1B = 0;
TIMSK1 |= (1 << TOIE1);
TCNT1= PRELOAD;
TCCR1B |= (1 << CS11);
TCCR1B |= (1 << CS10);
sei();
}

ISR(TIMER1_OVF_vect)
{
TCNT1=PRELOAD;
count++;
count2++;
if (count>10)
{
myDisplay.DisplayString(tempString, 0);
count = 0;
}
if(count2>604800)
{
delSMS();
count2 = 0;
}
}

Section II

void serialEvent()
{
while (Serial.available()>0)
{
char lastChar = (char)Serial.read();
IncomingData += lastChar;
int len =strlen(IncomingData.c_str());
char *p=IncomingData.c_str();
p[len-1]=’\0’;
IncomingData = p;
}
}

When the code is running, some serial readings are missing. But if I remove the first section from my code, that serial data reads well. What happens in this case. Please suggest the solution for this matter.

 char lastChar = (char)Serial.read();
      IncomingData += lastChar;
      int len =strlen(IncomingData.c_str());
      char *p=IncomingData.c_str();
      p[len-1]='\0';
      IncomingData = p;

Couldn't you decide whether to just use Strings or strings?

Please post your code, in code tags.

delSMS() and myDisplay.DisplayString(tempString, 0) both look like they are operations that could be slow.

Don't call them from an ISR - during an ISR, interrupts are disabled, so if your ISR takes longer to run than it takes for a character to arrive over serial, you will lose serial data.

Set a flag in the ISR (be sure to make this global flag variable volatile), and check for that in loop and take the appropriate actions if it is set.