Xx derailleur I use has mid-length cage that is precisely same dimension as sram red rd it replaced.
Rated for 36t.
Could go 40 easy.
problem was there was no integral barrel adjuster as we road cyclists are accustomed to.
I had to build one in, for I hate and despise and detest in-line barrel adjusters.
If you enjoy being a ball of nerves, buy a 300 dollar derailleur and start drilling and threading holes in it.
Thank god it worked perfectly. But Lord I hate having to do things like that.