Improve platform speed and search responsiveness

Implement performance optimizations including HTTP compression, enhanced caching strategies, reduced search debounce time, and optimized thumbnail generation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d7424866-83d1-4486-a212-ac12b4c7becf
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/d7424866-83d1-4486-a212-ac12b4c7becf/UCWygK2
This commit is contained in:
sebastjanartic
2025-08-28 15:04:47 +00:00
parent 177f5d945f
commit e40b738478
8 changed files with 127 additions and 26 deletions
+6 -5
View File
@@ -41,7 +41,9 @@ export class BunnyService {
'AccessKey': this.apiKey,
'Accept': 'application/json',
'Content-Type': 'application/json'
}
},
// Add timeout and connection optimizations
signal: AbortSignal.timeout(10000), // 10 second timeout
});
if (!response.ok) {
@@ -52,11 +54,10 @@ export class BunnyService {
}
private bunnyVideoToVideo(bunnyVideo: BunnyVideo): Video {
// Generate thumbnail URL from Bunny CDN - try multiple formats
// Some videos may have custom thumbnails, others auto-generated
// Generate optimized thumbnail URL from Bunny CDN with WebP format for better performance
const thumbnailUrl = bunnyVideo.thumbnailFileName
? `https://${this.hostname}/${bunnyVideo.guid}/${bunnyVideo.thumbnailFileName}`
: `https://${this.hostname}/${bunnyVideo.guid}/thumbnail.jpg`;
? `https://${this.hostname}/${bunnyVideo.guid}/${bunnyVideo.thumbnailFileName}?width=400&height=225&format=webp`
: `https://${this.hostname}/${bunnyVideo.guid}/thumbnail.jpg?width=400&height=225&format=webp`;
// Generate signed HLS URL for private video access
const hlsUrl = this.generateSignedUrl(bunnyVideo.guid);