I noticed performance issues with `DropdownMenu` w...
# compose-desktop
s
I noticed performance issues with
DropdownMenu
when it contains a lot of items while
LazyColumn
with the same amount of items works just fine. It doesn't lag while scrolling but it takes ages to show up and update it's content. is this a known issue and dropdowns are simply not cut out for >100 items or is the problem rather in my code?
3
m
Yeah, I have a lists of few hundred items (less than 1000) and it took me quite a while to optimize them to be anyhow useable (I still have a few second lag on showing up the list and up to a second when hiding). What I have done was to: • use `BasicText`instead of
Text
• use `BasicText`instead of `TextField`and replace it temporarily with
TextField
when clicked • cache `Icon`s with `ImageBitmap`s • use as little `CompositionLocal`s as possible • use proguard (mainly to remove `sourceInformation*`calls) • replace compose-runtime module with custom one from upstream androidx compose
😮 1
s
I'm glad it's not just me, because nothing I've tried has fixed said lags either. I settled on a simple
Popup
-
LazyColumn
implementation for now.