Hi there, I am trying to build similar to <https:/...
# compose
a
Hi there, I am trying to build similar to https://github.com/InQBarna/TableFixHeaders lib for compose. I have implemented some parts of it with the help of lazyColumn and lazyRow however the horizontal scroll that scrolls the entire content with top headers lags.I want a smooth scroll. Can anyone guide me in the right direction? check out my implementation here with function DrawTableUi https://github.com/youranshul/tableFixheaderCompose/blob/main/app/src/main/java/com/retroent/tablefixheadercompose/drawTableVIew.kt
c
Are you testing release builds with r8 enabled?
p
Have you tried
LazyGrid
?
a
@Colton Idle No i am testing on debug build.
@Petr Laštovička I have not tried with Lazy grid as my problem is not laying out the view but their scroll. Do you really think lazygrid would help?
p
Idk, it just seems like the right tool to do the job I have forgotten we have only directional grids 😅 Still I would try VerticalGrid with horizontalScroll modifier
a
@Petr Laštovička would try with verticalGrid,thanks.
m
by doing xxx.toList, you are introducing a lot of recompositions. Try to improve that and see if it betters
c
Please lookup any convos in this slack channel regarding compose perf. pretty much the first thing the compose team will tell you is to test in release builds with minify = true.
a
@Colton Idle I tried with release builds with minify=true but that did not help, however @myanmarking pointing about the recomposition due to xxx.toList() , I fixed that and it did not work but I realized my ListState.firstVisibleItemScrollOffset was causing lots of recomposition. I have found another approach for a workaround though I have some other problems. I will fix a few things and update you guys on the progress and help. Thanks