'build.ninja generate took too long time on 8G ram machine

Building machine info(Non building status):

              total        used        free      shared  buff/cache   available
Mem:          7.7Gi       314Mi       7.2Gi       0.0Ki       181Mi       7.2Gi
Swap:          17Gi       1.4Gi        16Gi

The building logs,

[100% 1/1] out/soong/.minibootstrap/minibp out/soong/.bootstrap/build.ninja
[ 98% 80/81] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
     2188:18 out/soong/.bootstrap/bin/soong_build out/soong/build.ninja

So, the file "out/soong/build.ninja" generate took too long time.
Whether can optimizing the time? I check the source code of build/blueprint, but no ideas.



Sources

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

Source: Stack Overflow

Solution Source