Rotary Decoder circuit for high PPR Encoders
Well, let's have a look at your library's documentation:


  The current implementation of the RotaryEncoder class uses polling to monitor the inputs rather than using GPIO interrupts. It looks like the plumbing is in place within wiringpi to use interrupts on GPIOs, but I’ll leave that for another day. Instead I have included an optional worker thread class that can be used to monitor the inputs, leaving the main thread free to go about its business.


On a preemptive multitasking system like the Pi, the OS will run each process in turn whenever they need to run. Therefore, any system relying on polling will miss events when the CPU is busy doing something else than running the polling code. I'm quite surprised this library doesn't miss pulses even with a low PPR encoder... it should happen if cpu load was high.

Therefore, it doesn't work. 

The encoder docs mentions a maximum pulse frequency of 200kHz. This is quite high. 

If the Pi can handle such a high interrupt rate, use pin-change interrupts. 

Else, use a hardware decoder (or a dedicated micro wired as a such, and reporting to the Pi).