apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

chore: reduce the size of the compiled binary file of manager-api

Open idbeta opened this issue 5 years ago • 9 comments

Feature request

when used make build to build Apache APISIX Dashboard, the size of the binary file of manager-api is almost 27M, it should be reduced.

idbeta avatar Jan 13 '21 10:01 idbeta

By default Go Compiler saves the debug info into the binary, it's possible to strip it.

tokers avatar Jan 14 '21 01:01 tokers

IMO, I think we should add another make option that will ignore the debug info and disable the symbol table. Because the debug info and symbol table may be useful for developers to debug.

starsz avatar Jan 14 '21 06:01 starsz

I'm not sure whether this is an good idea since for now i don't think the manager api is stable enough, once it crashes, debug info is important to dump the stack, otherwise we have no idea to debug it.

tokers avatar Jan 15 '21 01:01 tokers

I'm not sure whether this is an good idea since for now i don't think the manager api is stable enough, once it crashes, debug info is important to dump the stack, otherwise we have no idea to debug it.

tokers avatar Jan 15 '21 01:01 tokers

I'm not sure whether this is an good idea since for now i don't think the manager api is stable enough, once it crashes, debug info is important to dump the stack, otherwise we have no idea to debug it.

So I recommend we can add another make option for reducing the binary size.

@idbeta By the way, what's the reason that we need to reduce the binary size. Only because it's too large?

starsz avatar Jan 15 '21 01:01 starsz

I'm not sure whether this is an good idea since for now i don't think the manager api is stable enough, once it crashes, debug info is important to dump the stack, otherwise we have no idea to debug it.

So I recommend we can add another make option for reducing the binary size.

@idbeta By the way, what's the reason that we need to reduce the binary size. Only because it's too large?

yes, so I think this is not a high priority optimization point.

idbeta avatar Jan 15 '21 02:01 idbeta

I'm not sure whether this is an good idea since for now i don't think the manager api is stable enough, once it crashes, debug info is important to dump the stack, otherwise we have no idea to debug it.

So I recommend we can add another make option for reducing the binary size. @idbeta By the way, what's the reason that we need to reduce the binary size. Only because it's too large?

yes, so I think this is not a high priority optimization point.

@idbeta What about preparing some stuffs like debuginfo.rpm when compiling it.

tokers avatar Jan 15 '21 05:01 tokers

@idbeta What about preparing some stuffs like debuginfo.rpm when compiling it.

sorry, I don't quite understand what you mean. I don't think reduce is necessary now. You can see if a lot of people give feedback about this before deciding to optimize.

idbeta avatar Jan 15 '21 06:01 idbeta

Depending on the scope of the project, this component and process will not exist, so this is no longer an issue. ref #2981

If you have any questions, please start a new issue!

bzp2010 avatar Apr 17 '25 17:04 bzp2010