server icon indicating copy to clipboard operation
server copied to clipboard

Core rebuild is extremely long

Open alxmamaev opened this issue 1 year ago • 5 comments

I'm trying to add my specific functionality into triton-core, but rebuilding and testing this is exceptionally long. Most of the time spends on grpc-patching which is just a dumb copy of thousands of files, its take for me 7-8 minutes for every re-build.

What is your development pipeline? How can I build gRPC with a patch just once and then just skip this step?

P.S. I already checked the cmake_build script and did not find any helpful things there.

alxmamaev avatar Aug 29 '22 09:08 alxmamaev

The hotfix is to use some hash-compare in the script before run rmtree and copytree. But maybe you have some CMake trick to not execute ExternalProject_Add, IDK, I'm not cmake-expert

alxmamaev avatar Aug 29 '22 10:08 alxmamaev

Time to rebuild on my MacBook M1:

Rebuild with grpc-patch

real    9m11.775s
user    0m12.029s
sys     1m17.344s

Rebuild with commented grpc-patch

real    1m36.359s
user    0m2.616s
sys     0m12.435s

🤯🤯🤯🤯🤯

alxmamaev avatar Aug 29 '22 10:08 alxmamaev

CC @nv-kmcgill53

rmccorm4 avatar Aug 29 '22 18:08 rmccorm4

Hi @alxmamaev, I was able to reproduce your issue. I think your solution of hashing the files/directories is the best way forward for this issue, and we may want to apply this more generally to the project. I have filed a ticket DLIS-4114, but I can't give a timeline for when this will be worked. I will cc @GuanLuo in case he has more insight.

nv-kmcgill53 avatar Aug 30 '22 16:08 nv-kmcgill53

@nv-kmcgill53 Ok, im just using my hot-fix for now.

alxmamaev avatar Aug 30 '22 20:08 alxmamaev