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

Fonts have a severe impact on build times #22

Open
timboldt opened this issue Aug 9, 2020 · 4 comments
Open

Fonts have a severe impact on build times #22

timboldt opened this issue Aug 9, 2020 · 4 comments

Comments

@timboldt
Copy link

timboldt commented Aug 9, 2020

I imagine this is more of a compiler issue (?), but I think it is worth noting here.

It is frustrating that including TinyFonts increases build times by 10x or more.

A partial workaround is to copy the desired font into your project, but it generally means renaming packages to make it work. (Maybe TinyGo 0.14 helps, now that it has module support.)

@sago35
Copy link
Member

sago35 commented Aug 10, 2020

I also get frustrated when building https://github.com/tinygo-org/tinyfont/blob/master/examples/pybadge/main.go on my windows laptop.

It might be better to use tinyfontgen on dev branch to create your own fonts.
You can use the bdf file as input to create a new font.
https://github.com/tinygo-org/tinyfont/tree/dev/cmd/tinyfontgen

@sago35
Copy link
Member

sago35 commented Aug 10, 2020

source: c5a301b

ubuntu 20.04
ryzen 3700

$ git rev-parse HEAD
c5a301ba5c68fdebfcc94d01d3d596b3a0f367b3

$ time tinygo build -o app.hex --target wioterminal --size short ./examples/displays
   code    data     bss |   flash     ram
  11712   32692    6364 |   44404   39056

real    0m13.646s
user    0m16.695s
sys     0m0.595s

windows 10 (git-bash)
core i7-7600U

$ git rev-parse HEAD
c5a301ba5c68fdebfcc94d01d3d596b3a0f367b3

$ time tinygo build -o app.hex --target wioterminal --size short ./examples/displays/
   code    data     bss |   flash     ram
  11696   32692    6364 |   44388   39056

real    0m54.952s
user    0m0.000s
sys     0m0.015s

@deadprogram
Copy link
Member

deadprogram commented May 18, 2023

TinyGo caches things a lot better these days. Also compiler is faster overall than it was. Can we close this issue now in favor of new ones as needed?

@conejoninja
Copy link
Member

I vote for closing inactive issues, we could take a look at this :
https://docs.github.com/en/github-ae@latest/actions/managing-issues-and-pull-requests/closing-inactive-issues

And close them by being inactive for X months (instead of days as proposed in the link).
In case this is still an issue (after almost three years) it could be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants