A quote from MAS985 one of our resident pump experts:
IMHO, the pipe in front of the pump has little bearing on cavitation or any other issues with pumps. It is something that is recommended in the water distribution industry where the pumps are much larger and much more prone to cavitation and they don't use a pump basket so the flow into the impeller is directly related to the plumbing attached to the impeller inlet. A residential pool pump has a pump basket which completely changes the fluid dynamics into the impeller inlet so the plumbing ahead of the basket has little impact to the flow dynamics other than head loss. Plus the turbulence in a typical pump basket overwhelms any benefit that a straight piece of pipe might have. Although some pump manufactures continue to recommend it for residential pool pumps, there is little evidence that it makes any difference at all. Most installers of pumps ignore this recommendation without any deleterious effects whatsoever. I would make the straight piece as long as you can but don't get overly concerned about it and don't add any extra fittings to get a longer piece either.