Open krisnye opened 4 years ago
The most practical approach I’ve come up with is this: Maintain two lists for items: Normal Items = All items with size <= visible window size Large Items = Everything else Sort Normal Items (whenever their rects may have changed). Then to find visible: binary search to visible window area and then check for anything intersecting up to a full window above and/or beneath the visible window. Then check every large item for visibility. This would be O page-size + O large-items
Visible performance degradation. Profile on a virtual list with large N and identify areas to optimize.