v2: replace @tanstack/svelte-virtual with custom virtualizer (#516)
* impr: use custom virtualizer for post feeds * fix: use resizeobserver to update heights dynamically * fix: add overcsan and initialOffset for items * misc: update package.json (remove tanstack) * misc: use binary search to improve performance * fix: use translate for cheap gpu composite time * fix: reduce recalculate calls * feat: re-add list restore * fix: use relative instead of translations * misc: add ssr support to virtualizer * fix: onload scroll broken
This commit is contained in:
1 parent
af02883314
commit
472aa00e65
8 files changed
+303
-164
No files matched your search
@@ -49,6 +49,9 @@ export async function postFeed(args: {
|
||||
url: args.url,
|
||||
lastSeen: 0,
|
||||
instance: instance.data,
|
||||
clientData: {
|
||||
itemHeights: [],
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -96,6 +99,9 @@ export interface PostFeed {
|
||||
lastSeen: number
|
||||
instance: string
|
||||
id: PostFeedID
|
||||
clientData: {
|
||||
itemHeights: (number | null)[]
|
||||
}
|
||||
}
|
||||
|
||||
export let postFeeds = new PostFeedState()
|
||||
Reference in new issue
Block a user