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

Disable WebGL debug mode #1

Merged
merged 1 commit into from
May 27, 2024
Merged

Disable WebGL debug mode #1

merged 1 commit into from
May 27, 2024

Conversation

Geo25rey
Copy link
Contributor

When debug mode is enabled ~50ms of latency is added for every GL call.

This patch should make the UI feel very responsible like a normal web app.

When debug mode is enabled ~50ms of latency is added for every GL call.

This patch should make the UI feel very responsible like a normal web app.
@andydotxyz andydotxyz merged commit 70c805e into fyne-io:main May 27, 2024
@andydotxyz
Copy link
Member

Thanks very much, hopefully this makes a noticeable difference.

@Jacalz
Copy link
Member

Jacalz commented May 27, 2024

This is a very nice improvement but I think it is the wrong fix unfortunately (at least in the long run but it is a nice solution until we have solved it entirely). The index.js file is generated from the template in the cmd/fyne tool. The following template code does not emit the debug information if built with release mode: https://github.com/fyne-io/tools/blob/053777509e345c6230c590548d108ce8a5cd6772/cmd/fyne/internal/templates/data/index.html#L41-L43

This seems to indicate that the demo either wasn't built as a release mode (notably also has debug info in the binary and maybe missing out on more improvements) and should be regenerated with -tags release when being built. To what degree are those debug calls necessary? I kind of wonder if we should invert the logic and only do it in the debug build mode instead of release (with normal being the default of course)?

@Jacalz
Copy link
Member

Jacalz commented May 27, 2024

PS: I was going to generate this repo again but I have a too new Go version for GoperJS to work. I'm glad that we have that support removed for v2.5 and the new tool over in the tools repo 😅

@andydotxyz
Copy link
Member

There was a discussion on slack about this so the notes above were pretty much covered.

However the question of only having this on if -tags debug is set seems like an interesting idea.

@Jacalz
Copy link
Member

Jacalz commented May 27, 2024

Ah, sorry. I missed that conversation (seems to be on Discord for the record) when I was out on a long run but I have read up on it now. I agree with all of what was being said. Let's get this repo regenerated with release mode once v2.5is released. I think we also want some kind of automated script to run the update for us and avoid someone missing to add release mode next time. Anyway, nice catch finding this out Geoffrey :)

@Jacalz
Copy link
Member

Jacalz commented May 27, 2024

I opened #1 and #2 to track this.

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

Successfully merging this pull request may close these issues.

3 participants