Collection Speed Improvements (#874)

* Add UltraSlimCollectionSerializer and update CollectionViewSet for optimized listing

- Introduced UltraSlimCollectionSerializer for efficient data representation.
- Updated CollectionViewSet to use the new serializer for list actions.
- Enhanced queryset optimizations with prefetching for related images.
- Modified frontend components to support SlimCollection type for better performance.

* Optimize rendering of collection cards by adding a unique key to the each block
This commit is contained in:
Sean Morley
2025-09-22 08:34:23 -04:00
committed by GitHub
parent 240c617010
commit 8a0f7310b0
7 changed files with 203 additions and 86 deletions

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import type { Collection, User } from '$lib/types';
import type { Collection, SlimCollection, User } from '$lib/types';
import { createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
import { onMount } from 'svelte';
@@ -11,7 +11,7 @@
import Share from '~icons/mdi/share';
import Clear from '~icons/mdi/close';
export let collection: Collection;
export let collection: SlimCollection | Collection;
// Extended user interface to include status
interface UserWithStatus extends User {
@@ -160,6 +160,7 @@
<dialog id="my_modal_1" class="modal">
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<div
class="modal-box w-11/12 max-w-5xl p-6 space-y-6"
role="dialog"