Question about esp8266 with in WIFI_STA mode and 74hc595 shift register

I am trying to make a wireless controller for my Atari 2600. I know there are solutions you can buy but I have been programming most of my life and decided I wanted to learn arduino.

I have 1 esp8266 in AP mode collecting button presses from a breadboard using a 74hc165 and sending them to another esp8266 on a different breadboard where the 595 is hooked up to some LEDS. Im sending a byte that has the bits all turned high and the button pressed will be low. All of this is working except the leds lighting up.

In trying to debug this I loaded up a simple 595 sketch that will light up leds in a sequence to make sure that the 595 is working. When it was I started putting elements into this sketch from the original one receiving data to light up the leds. In doing this I noticed something very strange. When I put in the wifi initialization and put the led sequence while the esp was waiting to connect to the other esp in AP mode there seems to be an interrupt in the pattern. Here is the modified sketch:

/*
Adafruit Arduino - Lesson 4. 8 LEDs and a Shift Register
*/
 
int latchPin = 0;//12
int clockPin = 2;//11
int dataPin = 3;//14
 
byte leds = 0;
const char* ssid = "ATRECEIVE2600";
const char* pass = "A2600Vin";
IPAddress host(192,168,4,2);

void setup() 
{
  pinMode(3, FUNCTION_3);
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);  
  pinMode(clockPin, OUTPUT);
 
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, pass);
}
 
void loop() 
{
  if(WiFi.status() != WL_CONNECTED)
  {  
    leds = 0;
    updateShiftRegister();
    delay(250);
    for (int i = 0; i < 8; i++)
    {
      bitSet(leds, i);
      updateShiftRegister();
      delay(250);
    }
  }
}
 
void updateShiftRegister()
{
   digitalWrite(latchPin, LOW);
   shiftOut(dataPin, clockPin, LSBFIRST, leds);
   digitalWrite(latchPin, HIGH);
}

When running this the pattern, ligting up one led at a time until they are all lit it there but it skips some then picks up when the clock seems to kick back in, almost as if the esp is busy. Is this the wifi stuff getting in the way? When I run the original sketch with out the wifi stuff it works fine:

/*
Adafruit Arduino - Lesson 4. 8 LEDs and a Shift Register
*/
 
int latchPin = 0;//12
int clockPin = 2;//11
int dataPin = 3;//14
 
byte leds = 0;
 
void setup() 
{
  pinMode(3, FUNCTION_3);
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);  
  pinMode(clockPin, OUTPUT);
}
 
void loop() 
{
  leds = 0;
  updateShiftRegister();
  delay(500);
  for (int i = 0; i < 8; i++)
  {
    bitSet(leds, i);
    updateShiftRegister();
    delay(500);
  }
}
 
void updateShiftRegister()
{
   digitalWrite(latchPin, LOW);
   shiftOut(dataPin, clockPin, LSBFIRST, leds);
   digitalWrite(latchPin, HIGH);
}

I know the esp is a very lightweight piece of tech but I wouldn’t think that the loop method would be interrupted by other processes when it is so light weight. Has anyone else seen this before, and any ideas on what to do to get around it? I have done lots of research but have found nothing for this issue. Thanks in advance.