Skip to content

Remove IconElement caching from PaletteItem#19149

Merged
DHowett merged 1 commit intomainfrom
dev/duhowett/no-cachey-icon
Jul 21, 2025
Merged

Remove IconElement caching from PaletteItem#19149
DHowett merged 1 commit intomainfrom
dev/duhowett/no-cachey-icon

Conversation

@DHowett
Copy link
Member

@DHowett DHowett commented Jul 19, 2025

In #19132, we introduced caching for BasePaletteItem::ResolvedIcon as a late optimization.

We actually can't cache those, because they're UI elements, with parents and relationships and all. When you filter a list with icons and the list elements change physical position, they're assigned new templates-- and new parents.

Fixes e7939bb

In #19132, we introduced caching for BasePaletteItem::ResolvedIcon as a
late optimization.

We actually can't cache those, because they're UI elements, with parents
and relationships and all. When you filter a list with icons and the
list elements change physical position, they're assigned new templates--
and new parents.

Fixes e7939bb
@DHowett
Copy link
Member Author

DHowett commented Jul 19, 2025

This one is for @e82eric :)

@DHowett DHowett enabled auto-merge (squash) July 19, 2025 00:17
@DHowett DHowett merged commit 3979e82 into main Jul 21, 2025
19 checks passed
@DHowett DHowett deleted the dev/duhowett/no-cachey-icon branch July 21, 2025 22:11
@carlos-zamora
Copy link
Member

As part of my research, I'm trying to understand how useful these comments are in real-world development. If you have a moment, I'd be super grateful if you could quickly reply to these two yes/no questions:

Hi @OrangeDoro. Just reviewed and approved this PR. Here's some feedback:

  1. Does this comment provide suggestions from a dimension you hadn’t considered?

Yes. It's nice that it calls out the null pointer dereference.

  1. Do you find this comment helpful?

Honestly no, at least not in this instance. The code change in the PR was very small and well summarized by the PR title and body. Reading through the feedback generated by your tool just added to what I had to read/review. Personally, I think this could be more helpful on a more complex PR, especially if it's feature development instead of a bug fix. Pushing for unit tests in that scenario would definitely be helpful.

Good luck on your research!

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.

2 participants