What length exactly are we talking about here? The length does impact Display Port and HDMI a bit at higher resolutions and refresh rates, but just make sure the cable lists whatever you need, you can buy 5m DisplayPort cables which will support 4K 144Hz and more. For HDMI they make optical cables for longer cables, I have a 10m HDMI cable which supports 4K 144Hz, but I couldn't get even 4K 30 over 10m of cheap HDMI cable (that one only supported 1080p 60).