Disable sql debugging
This commit is contained in:
parent
fc9b003ed6
commit
8586cd0a5c
@ -1,6 +1,6 @@
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { clsx } from 'clsx/lite';
|
import { clsx } from 'clsx/lite';
|
||||||
import { SHOULD_PREFETCH_GLOBAL } from '@/site/config';
|
import { SHOULD_PREFETCH_ALL_LINKS } from '@/site/config';
|
||||||
|
|
||||||
export default function SwitcherItem({
|
export default function SwitcherItem({
|
||||||
icon,
|
icon,
|
||||||
@ -9,7 +9,7 @@ export default function SwitcherItem({
|
|||||||
onClick,
|
onClick,
|
||||||
active,
|
active,
|
||||||
noPadding,
|
noPadding,
|
||||||
prefetch = SHOULD_PREFETCH_GLOBAL,
|
prefetch = SHOULD_PREFETCH_ALL_LINKS,
|
||||||
}: {
|
}: {
|
||||||
icon: JSX.Element
|
icon: JSX.Element
|
||||||
href?: string
|
href?: string
|
||||||
|
|||||||
@ -19,14 +19,14 @@ import AdminPhotoMenu from '@/admin/AdminPhotoMenu';
|
|||||||
import { Suspense } from 'react';
|
import { Suspense } from 'react';
|
||||||
import DivDebugBaselineGrid from '@/components/DivDebugBaselineGrid';
|
import DivDebugBaselineGrid from '@/components/DivDebugBaselineGrid';
|
||||||
import PhotoLink from './PhotoLink';
|
import PhotoLink from './PhotoLink';
|
||||||
import { SHOULD_PREFETCH_GLOBAL } from '@/site/config';
|
import { SHOULD_PREFETCH_ALL_LINKS } from '@/site/config';
|
||||||
|
|
||||||
export default function PhotoLarge({
|
export default function PhotoLarge({
|
||||||
photo,
|
photo,
|
||||||
primaryTag,
|
primaryTag,
|
||||||
priority,
|
priority,
|
||||||
prefetch = SHOULD_PREFETCH_GLOBAL,
|
prefetch = SHOULD_PREFETCH_ALL_LINKS,
|
||||||
prefetchRelatedLinks = SHOULD_PREFETCH_GLOBAL,
|
prefetchRelatedLinks = SHOULD_PREFETCH_ALL_LINKS,
|
||||||
showCamera = true,
|
showCamera = true,
|
||||||
showSimulation = true,
|
showSimulation = true,
|
||||||
shouldShareTag,
|
shouldShareTag,
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { clsx } from 'clsx/lite';
|
|||||||
import { pathForPhoto } from '@/site/paths';
|
import { pathForPhoto } from '@/site/paths';
|
||||||
import { Camera } from '@/camera';
|
import { Camera } from '@/camera';
|
||||||
import { FilmSimulation } from '@/simulation';
|
import { FilmSimulation } from '@/simulation';
|
||||||
import { SHOULD_PREFETCH_GLOBAL } from '@/site/config';
|
import { SHOULD_PREFETCH_ALL_LINKS } from '@/site/config';
|
||||||
|
|
||||||
export default function PhotoSmall({
|
export default function PhotoSmall({
|
||||||
photo,
|
photo,
|
||||||
@ -14,7 +14,7 @@ export default function PhotoSmall({
|
|||||||
simulation,
|
simulation,
|
||||||
selected,
|
selected,
|
||||||
priority,
|
priority,
|
||||||
prefetch = SHOULD_PREFETCH_GLOBAL,
|
prefetch = SHOULD_PREFETCH_ALL_LINKS,
|
||||||
}: {
|
}: {
|
||||||
photo: Photo
|
photo: Photo
|
||||||
tag?: string
|
tag?: string
|
||||||
|
|||||||
@ -3,14 +3,14 @@ import ImageTiny from '@/components/ImageTiny';
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { clsx } from 'clsx/lite';
|
import { clsx } from 'clsx/lite';
|
||||||
import { pathForPhoto } from '@/site/paths';
|
import { pathForPhoto } from '@/site/paths';
|
||||||
import { SHOULD_PREFETCH_GLOBAL } from '@/site/config';
|
import { SHOULD_PREFETCH_ALL_LINKS } from '@/site/config';
|
||||||
|
|
||||||
export default function PhotoTiny({
|
export default function PhotoTiny({
|
||||||
photo,
|
photo,
|
||||||
tag,
|
tag,
|
||||||
selected,
|
selected,
|
||||||
className,
|
className,
|
||||||
prefetch = SHOULD_PREFETCH_GLOBAL,
|
prefetch = SHOULD_PREFETCH_ALL_LINKS,
|
||||||
}: {
|
}: {
|
||||||
photo: Photo
|
photo: Photo
|
||||||
tag?: string
|
tag?: string
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { Camera, Cameras, createCameraKey } from '@/camera';
|
|||||||
import { parameterize } from '@/utility/string';
|
import { parameterize } from '@/utility/string';
|
||||||
import { TagsWithMeta } from '@/tag';
|
import { TagsWithMeta } from '@/tag';
|
||||||
import { FilmSimulation, FilmSimulations } from '@/simulation';
|
import { FilmSimulation, FilmSimulations } from '@/simulation';
|
||||||
import { PRIORITY_ORDER_ENABLED } from '@/site/config';
|
import { SHOULD_DEBUG_SQL, PRIORITY_ORDER_ENABLED } from '@/site/config';
|
||||||
import { screenForPPR } from '@/utility/ppr';
|
import { screenForPPR } from '@/utility/ppr';
|
||||||
|
|
||||||
const PHOTO_DEFAULT_LIMIT = 100;
|
const PHOTO_DEFAULT_LIMIT = 100;
|
||||||
@ -335,7 +335,7 @@ const safelyQueryPhotos = async <T>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debugMessage) {
|
if (SHOULD_DEBUG_SQL && debugMessage) {
|
||||||
const time =
|
const time =
|
||||||
(((new Date()).getTime() - start.getTime()) / 1000).toFixed(2);
|
(((new Date()).getTime() - start.getTime()) / 1000).toFixed(2);
|
||||||
console.log(`Executing sql query: ${debugMessage} (${time} seconds)`);
|
console.log(`Executing sql query: ${debugMessage} (${time} seconds)`);
|
||||||
|
|||||||
@ -2,7 +2,9 @@ import { parseAiAutoGeneratedFieldsText } from '@/photo/ai';
|
|||||||
import type { StorageType } from '@/services/storage';
|
import type { StorageType } from '@/services/storage';
|
||||||
import { makeUrlAbsolute, shortenUrl } from '@/utility/url';
|
import { makeUrlAbsolute, shortenUrl } from '@/utility/url';
|
||||||
|
|
||||||
export const SHOULD_PREFETCH_GLOBAL: boolean | undefined = undefined;
|
// Hard-coded configuration values
|
||||||
|
export const SHOULD_PREFETCH_ALL_LINKS: boolean | undefined = undefined;
|
||||||
|
export const SHOULD_DEBUG_SQL = false;
|
||||||
|
|
||||||
// META / DOMAINS
|
// META / DOMAINS
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user