diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-04 10:57:22 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-04 10:57:22 +0300 |
| commit | aa2f547cf2b6136dc60f541f30c27a426ec7c6c8 (patch) | |
| tree | 6180691fc7a0753f82c16aefdbf7da078928a3ae /internal/config | |
| parent | becf8a2ea235ee37adceabc1733ae8727cec5488 (diff) | |
refactor: change turbo boost to be enabled by default
- Changed environment variable from DTAIL_TURBOBOOST_ENABLE to DTAIL_TURBOBOOST_DISABLE
- Changed config field from TurboModeEnable to TurboBoostDisable
- Turbo boost is now enabled by default and must be explicitly disabled
- Updated all code references, documentation, and examples
- No change in functionality, only inverted the boolean logic
This makes turbo boost opt-out rather than opt-in, providing better
default performance for large files while allowing users to disable
it for scenarios where it adds overhead.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/initializer.go | 8 | ||||
| -rw-r--r-- | internal/config/server.go | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/internal/config/initializer.go b/internal/config/initializer.go index e750a1a..146d1a0 100644 --- a/internal/config/initializer.go +++ b/internal/config/initializer.go @@ -92,10 +92,10 @@ func (in *initializer) processEnvVars(args *Args) { if len(sshPrivateKeyPathFile) > 0 && args.SSHPrivateKeyFilePath == "" { args.SSHPrivateKeyFilePath = sshPrivateKeyPathFile } - // Check if turbo mode should be enabled from environment variable - // This allows backward compatibility with existing scripts - if Env("DTAIL_TURBOBOOST_ENABLE") { - in.Server.TurboModeEnable = true + // Check if turbo boost should be disabled from environment variable + // Turbo boost is enabled by default, can be explicitly disabled + if Env("DTAIL_TURBOBOOST_DISABLE") { + in.Server.TurboBoostDisable = true } } diff --git a/internal/config/server.go b/internal/config/server.go index d108ea3..efa7335 100644 --- a/internal/config/server.go +++ b/internal/config/server.go @@ -67,11 +67,11 @@ type ServerConfig struct { Ciphers []string `json:",omitempty"` // The allowed MAC algorithms. MACs []string `json:",omitempty"` - // Enable turbo mode for optimized file processing. When enabled, cat/grep/tail operations - // use a direct writing approach that bypasses internal channels for better performance. - // Note: This is disabled by default for MapReduce operations due to known issues with - // high-concurrency aggregate processing. - TurboModeEnable bool `json:",omitempty"` + // Disable turbo boost mode. When set to true, disables the optimized file processing mode. + // By default, turbo boost is enabled for cat/grep/tail and MapReduce operations, providing + // better performance through direct writing that bypasses internal channels. + // Set this to true only if you experience issues with turbo boost mode. + TurboBoostDisable bool `json:",omitempty"` } // Create a new default server configuration. @@ -90,7 +90,7 @@ func newDefaultServerConfig() *ServerConfig { Permissions: Permissions{ Default: defaultPermissions, }, - TurboModeEnable: false, // Default to false for safety, can be enabled via config + TurboBoostDisable: false, // Default to false, meaning turbo boost is enabled by default } } |
