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
This commit is contained in:
Yusuf İpek
2026-01-27 22:53:56 +03:00
parent 2e314c6d4c
commit d7450238f8
3 changed files with 13 additions and 8 deletions
+10 -5
View File
@@ -20,8 +20,8 @@ Translating subtitles is tedious and expensive:
## ✨ Features ## ✨ Features
- **Drag & Drop** - Just drop your SRT file and go - **Drag & Drop** - Just drop your SRT file and go
- **50 Parallel Requests** - Blazing fast translation - **100 Parallel Requests** - Blazing fast translation
- **Smart Chunking** - Processes 75 subtitle blocks per request for optimal speed/accuracy balance - **Smart Chunking** - Processes 20 subtitle blocks per request for optimal precision
- **Marker-Based Alignment** - Each subtitle block stays aligned with its timestamp - **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 Instructions** - Add context-specific translation rules (e.g., "Use informal 'sen' instead of formal 'siz'")
- **Custom Model Support** - Use any model available on OpenRouter - **Custom Model Support** - Use any model available on OpenRouter
@@ -43,10 +43,15 @@ Translating subtitles is tedious and expensive:
| Setting | Default | Description | | Setting | Default | Description |
|---------|---------|-------------| |---------|---------|-------------|
| **Model** | `google/gemini-3-flash-preview` | AI model for translation | | **Model** | `google/gemini-3-flash-preview` | AI model for translation |
| **Chunk Size** | 75 | Number of subtitle blocks per API request | | **Chunk Size** | 20 | Number of subtitle blocks per API request |
| **Parallel Requests** | 50 | Maximum concurrent API calls | | **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: For the best **performance/cost** balance, we recommend:
+2 -2
View File
@@ -54,11 +54,11 @@
</label> </label>
<label> <label>
<span>Chunk Size (SRT blocks)</span> <span>Chunk Size (SRT blocks)</span>
<input type="number" id="chunkSize" class="input-field" value="75" min="10" max="200"> <input type="number" id="chunkSize" class="input-field" value="20" min="10" max="200">
</label> </label>
<label> <label>
<span>Parallel Requests</span> <span>Parallel Requests</span>
<input type="number" id="parallelRequests" class="input-field" value="50" min="1" max="100"> <input type="number" id="parallelRequests" class="input-field" value="100" min="1" max="100">
</label> </label>
</div> </div>
<div class="instruction-section"> <div class="instruction-section">
+1 -1
View File
@@ -3,7 +3,7 @@
// ============================================ // ============================================
const DEFAULT_MODEL = 'google/gemini-3-flash-preview'; const DEFAULT_MODEL = 'google/gemini-3-flash-preview';
const DEFAULT_PARALLEL = 50; const DEFAULT_PARALLEL = 100;
const MAX_RETRIES = 3; const MAX_RETRIES = 3;
const RETRY_DELAY_MS = 1000; // 1 second const RETRY_DELAY_MS = 1000; // 1 second
const REQUEST_TIMEOUT_MS = 30000; // 30 seconds const REQUEST_TIMEOUT_MS = 30000; // 30 seconds