From 123842dfdacce8f2e3c1fe5e66521af4fcb54f74 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Fri, 13 Feb 2026 11:53:42 -0800 Subject: [PATCH] attempt to optimize the tagList query - this query in some cases can return a very large amount of data, depending on the size of the user's library - increasing the cacheTime reduces the frequency of fetches while disabling structuralSharing reduces the need for react-query to do a deep equality comparison for the cache --- src/renderer/features/shared/api/shared-api.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/features/shared/api/shared-api.ts b/src/renderer/features/shared/api/shared-api.ts index ffb50b3d6..6b2ea7d60 100644 --- a/src/renderer/features/shared/api/shared-api.ts +++ b/src/renderer/features/shared/api/shared-api.ts @@ -30,7 +30,7 @@ export const sharedQueries = { }, tagList: (args: QueryHookArgs) => { return queryOptions({ - gcTime: 1000 * 60, + gcTime: 1000 * 60 * 24, queryFn: ({ signal }) => { return api.controller.getTagList({ apiClientProps: { serverId: args.serverId, signal }, @@ -38,7 +38,8 @@ export const sharedQueries = { }); }, queryKey: queryKeys.tags.list(args.serverId || '', args.query.type), - staleTime: 1000 * 60, + staleTime: 1000 * 60 * 24, + structuralSharing: false, ...args.options, }); },