Danish embassies and consulates abroad normally decide visa applications within 14 days.
That only holds if the embassy can decide the case itself. Where it cannot, usually because documentation is missing or because there is doubt about the relationship between the applicant and the person inviting them, the case is passed to the Danish Immigration Service (Udlændingestyrelsen). That adds roughly 45 days.
Almost everything that pushes a case past the two weeks is already present in the file when it is submitted. Getting the documentation complete and the relationship properly evidenced from the start is what keeps a case inside the shorter timeframe.