Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

565
Views
Jetpack Compose lazycolumn performance

I'm new to jetpack compose and learning it from code of JetpackCompose Basics so I have found in the create a performant lazy list

Note: LazyColumn doesn't recycle its children like RecyclerView. It emits new Composables as you scroll through it and is still performant, as emitting Composables is relatively cheap compared to instantiating Android Views.

so how emitting new composable is cheap and performant, and then why not to just using column and compose the whole list for one time instead of keep emitting composable items while scrolling even if the emitting composables is only the items visible by layout

Update : if the visible items is 10, so before user scroll the items from 0 to 9 is visible and has been rendered, now the user has scrolled up and the visible items from 5 to 14, is jetpack compose removed the 5 items that have been previously rendered and if user scroll down, they will be recomposed or jetpack compose keep all rendered views in memory no matter if it visible or not

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Because there's a limit to the definition of "cheap", but no limit to how big a list can be. It may be cheap to output 100-200 composables (which I'm not convinced of, but lets say so for the sake of argument). It isn't cheap to output 10K of them. Which a list of results backed by a DB could easily be.

So you still don't want to output everything all time time. But it may be relatively cheap to output everything a user would reasonably scroll to, because nobody goes to the end of a 10K list. Thus making it a reasonable compromise based on common user behavior. You'd lose performance as they scroll further down the page, but the percentage of users who do that is small enough you may not care.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!