mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-01-10 12:19:32 +00:00
perf: optimize scrolling and image loading performance
Added performance optimizations to all library browser views: - Added cacheExtent: 500 to all GridView/ListView builders to pre-render items and reduce stuttering during scrolling - Wrapped grid items in RepaintBoundary to isolate repaints and improve performance - Optimized CachedNetworkImage with: - fadeInDuration/fadeOutDuration: Duration.zero to remove animation overhead - memCacheHeight: 300 to limit in-memory cache size - maxHeightDiskCache: 600 to resize images for better performance These changes should significantly reduce the stuttering observed when scrolling the authors grid and filtering books, especially on first load.
This commit is contained in:
parent
ccb8318341
commit
b434f73b2a
4 changed files with 18 additions and 2 deletions
|
|
@ -29,6 +29,7 @@ class LibraryGenresPage extends HookConsumerWidget {
|
|||
|
||||
return ListView.builder(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
cacheExtent: 500, // Pre-render items for smoother scrolling
|
||||
itemCount: sortedGenres.length,
|
||||
itemBuilder: (context, index) {
|
||||
final genre = sortedGenres[index];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue