go-qamel / qamel

Simple QML binding for Go
MIT License
177 stars 19 forks source link

[feature request] qamel docker support cache for speed up build #6

Closed fcying closed 5 years ago

fcying commented 5 years ago

add docker args -v ./qamel_cache:/home/user/.cache/go-build let qamel docker can use last build cache. it may be speed up build time.

It may be a option, default qamel docker is not use cache, qamel docker --cache use cache.

RadhiFadlillah commented 5 years ago

I've added this on 1a1c839.

It may be a option, default qamel docker is not use cache, qamel docker --cache use cache.

I decided to make qamel docker always uses cache because as it is right now Go command will periodically deletes cached data that has not been used recently, so it's fine to keep saving the cache.

fcying commented 5 years ago

awesome~_~ qamel docker has speeded up.

~/go/src/github.com/RadhiFadlillah/qamel/example/hello-world ‹master›$ rm -rf .qamel-cache
~/go/src/github.com/RadhiFadlillah/qamel/example/hello-world ‹master›$ time qamel docker win64 -o build/hello.exe
qamel docker win64 -o build/hello.exe  0.03s user 0.04s system 0% cpu 7.511 total

~/go/src/github.com/RadhiFadlillah/qamel/example/hello-world ‹master›$ time qamel docker win64 -o build/hello.exe
qamel docker win64 -o build/hello.exe  0.02s user 0.04s system 5% cpu 1.137 total