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

ConfigRawParams: fix search slowdown #3149

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

robertlong13
Copy link
Collaborator

We unwittingly introduced a search slowdown in #3130. The auto column width is terribly optimized reruns any time a row's visibility is changed, and SuspendLayout isn't helping like I'd think it would.

To fix this, I have the auto width turn on and off. I changed the default column width mode for the entire data grid to AllCells, and changed the NotSet columns to None, and changed the AllCells columns to NotSet. Anywhere where SuspendLayout was being called, I added Params.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None;, and restored the auto size wherever ResumeLayout was called (I actually implemented this in a helper function instead of copy/pasting that all 4 places).

We could also probably just go to fixed widths, but I'm happy enough with this approach now.

@IamPete1
Copy link
Member

Just given this a try here, Search works again, Thanks!

@meee1
Copy link
Contributor

meee1 commented Jul 19, 2023

i think this is why there where visible = false statement everywhere, as there is no layout performed while its not visible.

@robertlong13
Copy link
Collaborator Author

i think this is why there where visible = false statement everywhere, as there is no layout performed while its not visible.

The visible = false was only in processToScreen. If adding it to filterList fixes it, would you prefer that option to the one in this PR?

@meee1 meee1 merged commit 3768acd into ArduPilot:master Jul 19, 2023
@meee1
Copy link
Contributor

meee1 commented Jul 19, 2023

ive made some changes.
the issue with enabled it still renders, as enabled/disabled is a valid visual state, whereas visible doesnt try render at all.

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