AppView in a box as a Vite plugin thing hatk.dev

chore: remove memory diagnostics logging

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+2 -12
+1 -1
packages/hatk/src/indexer.ts
··· 309 309 log(`[indexer] Warmed repo status cache with ${statuses.length} entries`) 310 310 } 311 311 312 - startMemoryDiagnostics() 312 + // startMemoryDiagnostics() 313 313 314 314 let wsUrl = `${relayUrl}/xrpc/com.atproto.sync.subscribeRepos` 315 315 if (cursor) {
+1 -11
packages/hatk/src/main.ts
··· 27 27 import { initSetup } from './setup.ts' 28 28 import { initServer } from './server-init.ts' 29 29 30 - function logMemory(phase: string): void { 31 - const mem = process.memoryUsage() 32 - log( 33 - `[mem] ${phase}: heap=${Math.round(mem.heapUsed / 1024 / 1024)}MB rss=${Math.round(mem.rss / 1024 / 1024)}MB external=${Math.round(mem.external / 1024 / 1024)}MB arrayBuffers=${Math.round(mem.arrayBuffers / 1024 / 1024)}MB`, 34 - ) 35 - } 30 + 36 31 37 32 const configPath = process.argv[2] || 'hatk.config.ts' 38 33 const configDir = dirname(resolve(configPath)) 39 34 40 35 registerHatkResolveHook() 41 36 42 - logMemory('startup') 43 37 44 38 // 1. Load config 45 39 const config = await loadConfig(configPath) ··· 87 81 const { adapter, searchPort } = await createAdapter(config.databaseEngine) 88 82 setSearchPort(searchPort) 89 83 await initDatabase(adapter, config.database, schemas, ddlStatements) 90 - logMemory('after-db-init') 91 84 log( 92 85 `[main] Database initialized (${config.databaseEngine}, ${config.database === ':memory:' ? 'in-memory' : config.database})`, 93 86 ) ··· 158 151 log(`[main] OAuth initialized (issuer: ${config.oauth.issuer})`) 159 152 } 160 153 161 - logMemory('before-server') 162 154 163 155 // 5. Start server immediately (don't wait for backfill) 164 156 const collectionSet = new Set(collections) ··· 180 172 }) 181 173 .then((recordCount) => { 182 174 if (recordCount > 0 && !process.env.DEV_MODE) { 183 - logMemory('after-backfill') 184 175 log('[main] Restarting to reclaim memory...') 185 176 process.exit(1) 186 177 } ··· 225 216 .join(', ')}`, 226 217 ) 227 218 228 - logMemory('after-server') 229 219 230 220 // 6. Start indexer with cursor 231 221 const cursor = await getCursor('relay')