LCD Encoder Have Slow Response When Connected with Arduino Uno and Stepper Motor

Does this means i have to change the interrupt value to 7 and 8 respectively?

No, Pins 7 and 8 are not external interrupt pins on the UNO. See attachInterrupt() - Arduino Reference

There are three paths for you to take.

  1. change the external interrupt pins used by the encoder to 2 and 3. No major changes to your code are required.Just change the A and B pins to 2 and 3 from 7 and 8. Use INPUT_PULLUP as pin mode. Change the wiring to go to the correct pins.
    .

  2. use pin change interrupts on pins 7 and 8 instead of external interrupts. If you don't have the external interrupt pins available, you can use pin change interrupts with more modifications to the code. A pin change interrupt library might be helpful to you.

  3. use "polling"(that is, digitalRead() of the pins each pass through loop) instead of interrupts to determine the changes in the two pins. This can work with manually operated encoders which move relatively slowly compared to the speed of the processor. However, using polling will require all code to be non blocking as Robin2 has stated. It will also require more modifcations to the code.

If you need to follow path 2 or 3, do some research and then come back with additional code or questions.