1

I have an Android app that offers syntax highlighting for source code files. It's performing very poorly for large files such as this and freezing the UI for 10+ seconds. I have profiled my app and a method out of my control appears to be taking up a lot of time on the main thread. I would like to implement lazy rendering / 'pagination' so that instead of coloring the whole file when the user loads it, I only color what the user sees at first, and color in uniformly-sized chunks as (s)he scrolls down. What are some approaches I can take to implementing this? Thanks.

James Ko
  • 32,215
  • 30
  • 128
  • 239
  • Can [Paginating text in Android](https://stackoverflow.com/questions/31837840/paginating-text-in-android/32096884#32096884) be a starting point? – Onik Jul 07 '17 at 19:38

0 Answers0