It takes approximately 30 to 45 days to be issued a residence permit after arriving in Portugal with a valid D4 visa.