Length of pipework can have a big difference on the frictional head that the pump has to work against, especially with external filters which work against a static head of effectively zero. Another thing that makes a big difference is the diameter of the pipework and any restrictions to it such as kinks or sharp bends. Make sure all your bends are swept and, if you need a long run of pipework or tubing then consider stepping up the diameter or using lengths of larger diameter PVC pipe.
Media will impact flow if it is low void and packed tightly but left open with a lot of water space between the media it shouldn't impact too much.