Reduce verbosity of sensitive data

This commit is contained in:
Roman Krček
2025-08-07 16:34:36 +02:00
parent 6f7843405c
commit 99ab5cfb4f

View File

@@ -46,14 +46,6 @@
async function forceMemoryCleanup() {
await tf.nextFrame(); // Wait for any pending GPU operations
// Log memory state without aggressive cleanup
const memInfo = tf.memory();
console.log('Memory status:', {
tensors: memInfo.numTensors,
dataBuffers: memInfo.numDataBuffers,
bytes: memInfo.numBytes
});
// Only run garbage collection if available, don't dispose variables
if (typeof window !== 'undefined' && 'gc' in window) {
(window as any).gc();
@@ -151,7 +143,6 @@
if (isGoogleDriveUrl(photo.url)) {
// Download from Google Drive
console.log(`Downloading from Google Drive: ${photo.name}`);
blob = await downloadDriveImage(photo.url);
} else {
// For direct URLs, convert to blob
@@ -165,7 +156,6 @@
blob.type === 'image/heif' ||
photo.url.toLowerCase().endsWith('.heic')
) {
console.log(`HEIC detected for ${photo.name}. Starting conversion in background.`);
photo.status = 'loading'; // Visually indicate something is happening
// Don't await this, let it run in the background
convertHeicPhoto(index, blob);
@@ -185,8 +175,6 @@
async function convertHeicPhoto(index: number, blob: Blob) {
const photo = photos[index];
try {
console.log(`Converting HEIC with heic-convert for ${photo.name}...`);
// Dynamically import the browser-specific version of the library
const { default: convert } = await import('heic-convert/browser');
@@ -199,8 +187,6 @@
const convertedBlob = new Blob([outputBuffer], { type: 'image/jpeg' });
console.log(`Successfully converted HEIC for ${photo.name}`);
// Now that it's converted, process it like any other image
await processLoadedBlob(index, convertedBlob);
} catch (e) {
@@ -229,7 +215,6 @@
photo.objectUrl = objectUrl;
photo.status = 'success';
console.log(`Photo loaded successfully: ${photo.name}`);
// Save blob to IndexedDB instead of the store
await set(photo.url, blob);