perf(dashboard): optimize random book lookups and scroller batching

Add index on books table for random dashboard scroller queries, batch dashboard scroller requests, instrument pg pool logging, and cover dashboard scroller batching in e2e tests.
This commit is contained in:
neon
2026-08-05 21:48:23 +00:00
parent 854b1a75d1
commit 25bc7a21d4
38 changed files with 17212 additions and 117 deletions
+4
View File
@@ -1,4 +1,5 @@
import { fileURLToPath, URL } from 'node:url'
import { Agent } from 'node:http'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
@@ -6,6 +7,8 @@ import vueDevTools from 'vite-plugin-vue-devtools'
import tailwindcss from '@tailwindcss/vite'
import { VitePWA } from 'vite-plugin-pwa'
const apiAgent = new Agent({ keepAlive: true })
// https://vite.dev/config/
export default defineConfig({
define: {
@@ -141,6 +144,7 @@ export default defineConfig({
proxy: {
'/api': {
target: 'http://localhost:3000',
agent: apiAgent,
configure: (proxy) => {
proxy.on('proxyReq', (proxyReq, req) => {
if (req.headers.host) proxyReq.setHeader('x-forwarded-host', req.headers.host)