A wall from the Med to the Red would be about 80 miles. Ancient Egypt was very densely populated by the Ptolemaic period, something like 300 people to a square mile in the delta IIRC. At a rate of five to a house, that's 60 houses per square mile; with one soldier quartered on each house, a quasi-standing army of 50,000 occupies a square area less than 30 miles on each side. It would probably take about two days to concentrate the army, and then four or five to make it to either extreme end of the wall. The wall would need a chain of outposts or some kind of tripwire about a week's march ahead, depending on how fast the message can get to the army. Once the army is assembled behind the wall, it'd be a pretty formidable obstacle. Moreover, depending on the garrisons of the walls constituent fortresses, an invading army would need to leave behind considerable strength to keep them from interfering with their communications.