'ng build taking more time when running on kubernetes pod

We are trying to convert our existing CI(Continuous integration) agents from AWS EC2 to kubernetes pods so when we are trying to build(npm run build) the same application in both type of agents we are observing build is taking long time in kubernetes pods i.e build is taking 4Min in ec2 vs 10min in pod. We have provided same CPU, memory to our kubernetes pods also. when i tried to analyze the logs i see build is taking more time at this statement "Browser application bundle generation complete.". we tried setting npm config set unsafe-perm true, --max-old-space-size=10240 but its not helpful . Please let me know if am missing any configuration. Versions: npm 8.3.1 node version v16.14.0



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source