Handling User Input BGE

I use this to handle input

I’ve heard however that this method is more cpu intensive or something like that?

What are the pros and cons of doing it that way versus using sensors?

It is not performance eating as you would trigger the Python controller with a keyboard sensor. This means it runs ONLY when a key gets pressed or released [dependent on the sensor configuration it might be more often].

This is much more efficient than triggering a Python controller all the time (to check if a key was pressed). SImple math: it is more likely that a key status does not change than that it changes.