Through my own personal experience I would recommend either the 17 or the 22 Glock for IDPA. I have tried a 34 and found the additional length to be a hindrence as the ranges are short, the action fast and too much time is lost with the long sight radius. Several shooters I know have gone to the 19 (compact model) and their shooting has improved. The "long slides" are more at home on a bullseye range than at IDPA. 9mm or .40 S&W is a matter of personal choice.
I have modified my Glock 22 by polishing the trigger linkage, the firing pin, firing pin safety plunger, installing a 3.5 lb Ghost Rocket connector, extended mag release, entended slide release and Tru Glo TFO sights. BTW the TFO sights are fiber optic and night sights which give you excellent results if you shoot indoors with low light conditions. They are very bright and worth the money. All the springs are stock Glock, I have tried different and lighter springs and have had some reliability issues so keep them stock.