You may want to read this before you proceed:-
how to get the best out of this forum
It will tell you things like how to post your code. Many members use mobile devices and they will not handle a .ino file, although basically it is only text. That is why the forum has code tags.
Note all variables used inside and outside an interrupt must be declared as volatile.
What is an interrupt service?
I am assuming that because you mentioned an encoder you need to decode this, it is normal to use a state machine to do this.
Do you mean "too slow" to operate, or too much to set up?