mirror of
https://github.com/immich-app/immich.git
synced 2026-05-25 00:52:31 -04:00
5b10ff0eff
TimelineDay.isInOrNearViewport now derives from the firstInOrNearIndex
$state added in the previous commit (true iff first index != -1). This
replaces the old $derived.by that read every asset's isInOrNearViewport
via viewerAssets.some(), removing a per-asset subscription point that
filter() in AssetLayout had been creating for every render.
AssetLayout switches from filterIsInOrNearViewport(viewerAssets) to
viewerAssets.slice(firstInOrNearIndex, lastInOrNearIndex + 1). The slice
expression depends only on the two boundary $state values, not on any
asset's proximity $derived. Reactive churn during scroll collapses to:
boundary indices change → slice recomputes → {#each} reconciles.
Month.svelte passes the new boundary props through. filterIsInOrNearViewport
is still used at the month tier (to filter days) and stays in utils.
Change-Id: If4e30192146f3e987307b1efd7c6d41d6a6a6964
Immich web project
This project uses the SvelteKit web framework. Please refer to the SvelteKit docs for information on getting started as a contributor to this project. In particular, it will help you navigate the project's code if you understand the basics of SvelteKit routing.
When developing locally, you will run a SvelteKit Node.js server. When this project is deployed to production, it is built as a SPA and deployed as part of the server project.