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 logging large bytes arrays #1731

Merged
merged 1 commit into from
Feb 23, 2023
Merged

Conversation

tarkah
Copy link
Member

@tarkah tarkah commented Feb 23, 2023

I've noticed a huge impact on startup time when logging is enabled w/ iced due to large byte arrays getting printed to the terminal. This is due to the font bytes that are debugged, as well as the winit icon bytes that is debugged.

We log the winit::WindowBuilder directly, so I don't have access to customize how that is logged. This will require an upstream fix, if accepted. In the meantime, I think it's fair to log that struct as debug instead of info. We already log the iced window settings on info anyways.

I noticed there was already a fix for this on the glow side for default_font bytes. I've flipped this to is_some since it makes more sense the default_font: true means default_font: is_some / Some, meaning a default font was provided.

@hecrj hecrj added improvement An internal improvement developer experience labels Feb 23, 2023
@hecrj hecrj added this to the 0.9.0 milestone Feb 23, 2023
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Thanks! Good catch.

Hopefully one day something like this lands: rust-lang/rust#37009

@hecrj hecrj merged commit 573d27e into iced-rs:master Feb 23, 2023
@tarkah tarkah deleted the fix/debug-bytes branch February 23, 2023 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants