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

Remove constant debug field from canvas #4402

Merged
merged 2 commits into from
Nov 26, 2023

Conversation

Jacalz
Copy link
Member

@Jacalz Jacalz commented Nov 18, 2023

Description:

This clears out a small amount of memory usage by moving a build-constant field to a global constant variable. Most importantly, it makes Go have a better time deadcode eliminating methods that we only want to compile in for debug (especially the reflect code that gets the name of the canvasobject).

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

Thisclears out a small amount of memory usageby moving a build-constant field to a global constant variable. Most importantly, it makes Go have a better time deadcode eliminating methods that we only want to compile in for debug (especially the reflect code that gets the name of the canvasobject).
@coveralls
Copy link

coveralls commented Nov 18, 2023

Coverage Status

coverage: 65.086% (-0.007%) from 65.093%
when pulling 8580df7 on Jacalz:deadcode-debug-reflect
into 802f92b on fyne-io:develop.

internal/debug_disabled.go Outdated Show resolved Hide resolved
@Jacalz Jacalz requested a review from dweymouth November 21, 2023 20:30
@Jacalz Jacalz requested a review from andydotxyz November 21, 2023 20:41
Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice unification here thanks

@andydotxyz andydotxyz merged commit b4e136b into fyne-io:develop Nov 26, 2023
10 of 11 checks passed
@Jacalz Jacalz deleted the deadcode-debug-reflect branch November 27, 2023 08:04
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.

4 participants