From d7450238f84d754665ac2244a670524f2394f8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20=C4=B0pek?= Date: Tue, 27 Jan 2026 22:53:56 +0300 Subject: [PATCH] perf: optimize defaults - chunk size 20 for precision, 100 parallel requests - Changed chunk size from 75 to 20 for better subtitle alignment - Increased parallel requests from 50 to 100 for faster processing - Updated README with chunk size recommendation for precision - Updated license to GPL-3.0 --- README.md | 15 ++++++++++----- index.html | 4 ++-- src/app.js | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index dc41240..f4650a2 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ Translating subtitles is tedious and expensive: ## ✨ Features - **Drag & Drop** - Just drop your SRT file and go -- **50 Parallel Requests** - Blazing fast translation -- **Smart Chunking** - Processes 75 subtitle blocks per request for optimal speed/accuracy balance +- **100 Parallel Requests** - Blazing fast translation +- **Smart Chunking** - Processes 20 subtitle blocks per request for optimal precision - **Marker-Based Alignment** - Each subtitle block stays aligned with its timestamp - **Custom Instructions** - Add context-specific translation rules (e.g., "Use informal 'sen' instead of formal 'siz'") - **Custom Model Support** - Use any model available on OpenRouter @@ -43,10 +43,15 @@ Translating subtitles is tedious and expensive: | Setting | Default | Description | |---------|---------|-------------| | **Model** | `google/gemini-3-flash-preview` | AI model for translation | -| **Chunk Size** | 75 | Number of subtitle blocks per API request | -| **Parallel Requests** | 50 | Maximum concurrent API calls | +| **Chunk Size** | 20 | Number of subtitle blocks per API request | +| **Parallel Requests** | 100 | Maximum concurrent API calls | -### Recommended Model +### Recommended Settings + +**Chunk Size: 20** is recommended for better precision. Smaller chunks mean: +- Less text drift between subtitle blocks +- More accurate timing alignment +- Slightly more API calls, but with 100 parallel requests it's still fast For the best **performance/cost** balance, we recommend: diff --git a/index.html b/index.html index a518d46..a3c5315 100644 --- a/index.html +++ b/index.html @@ -54,11 +54,11 @@
diff --git a/src/app.js b/src/app.js index 840b756..931b33f 100644 --- a/src/app.js +++ b/src/app.js @@ -3,7 +3,7 @@ // ============================================ const DEFAULT_MODEL = 'google/gemini-3-flash-preview'; -const DEFAULT_PARALLEL = 50; +const DEFAULT_PARALLEL = 100; const MAX_RETRIES = 3; const RETRY_DELAY_MS = 1000; // 1 second const REQUEST_TIMEOUT_MS = 30000; // 30 seconds