I’ve seen quite a few examples of how to add alphabetical section headers to list views online. Example:

I implemented the functionality from
this website
. However, I have a list of approximately 8000 items. When trying to load this page it takes about 8 seconds which is obviously way too slow. With just a normal AlphabetIndexer it takes about 1.5 seconds (still slow, but much better).
Does anyone have any ideas on how to speed this up? If not, are there any other examples that are quicker than this?
Thanks!
What exactly do you mean by trying to load the page? How long does it take if you just load the items and don’t do any indexing? 8000 items is not that many to iterate over. It could however be a lot of items to load from disk, or the internet. You might want to consider showing a loading screen and reading in the data for your rows in the background.
The code you showed looks particularly complicated for what you’re trying to do. Below is a solution I’ve used. You can google for SectionIndexer. In my code itemManager is basically just an abstraction on a list, placeholders are null values, everything else is the data structure containing the information for the rows. Some code is omitted: