How Does a Contract’s Constructor Relate to Its Gas Usage during Deployment?
A contract's constructor is executed only once, during the contract's deployment. The gas used by the constructor is part of the total deployment cost and is consumed upfront.
The total gas limit for deployment is higher than the transaction gas limit for regular function calls. The gas used in the constructor does not affect the gas stipend provided during later Ether transfers to the deployed contract.