Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build time #261

Open
gucio321 opened this issue Feb 26, 2024 · 4 comments
Open

Build time #261

gucio321 opened this issue Feb 26, 2024 · 4 comments
Labels
investigating Searching for origins of the issue.

Comments

@gucio321
Copy link
Collaborator

I'm wondering why, each change to cimgui-go code triggers build of the whole project that takes (on my machine) about 3 minutes (this is a bit long imo).
In fact, because we build all shared libraries my question is: why it takes so long to build go project?

If I remember correctly after running go build with extra C flag for debugging it does many things with gcc. It looks that it compiles cimgui anyway?

@gucio321
Copy link
Collaborator Author

also I suppose this might be related to #252

@Wieku
Copy link
Contributor

Wieku commented Feb 27, 2024

I've timed the total build of my program with clean cache (go build -a)
Adding full build logs (-v -x) to see what's being compiled from cimgui

cimgui-go: 13m52.693s
log: cimgui-compile.log

inkyblackness: 10m17.397s
log: inky-compile.log

Build with no imgui compiles in similar time as inkyblackness version

Full build script just in case: https://github.com/Wieku/danser-go/blob/dev/dist-win.sh

@gucio321
Copy link
Collaborator Author

CGO_CXXFLAGS="$CGO_CXXFLAGS --verbose" CGO_CFLAGS="$CGO_CFLAGS --verbose" go build -v -a .
build-cimgui-go.txt

@gucio321 gucio321 added the investigating Searching for origins of the issue. label Sep 25, 2024
@gucio321
Copy link
Collaborator Author

here is a command that takes so many time:

TERM='dumb' CGO_LDFLAGS='' /usr/local/go/pkg/tool/linux_amd64/cgo -objdir $WORK/b056/ -importpath github.com/AllenDang/cimgui-go/imgui "-ldflags=\"-O2\" \"-g\" \"/home/me/git/cimgui-go/imgui/../lib/linux/x64/cimgui.a\"" -- -DCIMGUI_DEFINE_ENUMS_AND_STRUCTS -I $WORK/b056/ -O2 -g ./assert.go ./cflags.go ./cimgui_funcs.go ./cimgui_typedefs.go ./clipboard.go ./extra_types.go ./input_text.go ./type_accessor.go ./util.go

so this seems to be a go faoult...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating Searching for origins of the issue.
Projects
None yet
Development

No branches or pull requests

2 participants