GuideSeptember 22, 20266 min read

Optimizing ConfigSync for Large Configurations (1000+ Files)

Tracking hundreds of config files? ConfigSync stays fast with content-hash caching, delta uploads, smart filtering, and exclude patterns. Here is how to optimize for scale.

Growth Is Inevitable

Most developers start tracking a handful of files — shell config, git settings, editor preferences. But over months and years, the list grows. Add cloud credentials, database tools, multiple programming language configs, project-specific settings, and team shared configs. A power user can easily track hundreds of files. A team sharing configurations can reach into the thousands.

ConfigSync is built for this. Several optimization features work together to keep operations fast regardless of how many files you track.

Content-Hash Caching

The single most important optimization. ConfigSync computes a SHA-256 hash of every tracked file and caches the encrypted output. On subsequent pushes, only files whose content has actually changed get re-encrypted and uploaded:

MetricFirst Push (500 files)Second Push (0 changes)Third Push (2 changes)
Files checked500500 (mtime only)500 (mtime only)
Files re-encrypted50002
Data uploaded~2 MB0 bytes~8 KB
Duration~8 seconds< 0.5 seconds~0.8 seconds

The fast path uses file modification time as a first check. If a file's mtime has not changed, ConfigSync skips it without reading the file or computing a hash. This makes the common case — nothing changed — nearly instant.

The --changed Flag

By default, a push sends a complete state snapshot to the server. The --changed flag enables delta mode, sending only files that differ from the previous push:

Full push vs delta push
# Full push: complete state snapshot configsync push # Uploading complete state (500 files, cached content reused) # Delta push: only changed files configsync push --changed # Uploading 2 changed files... ✓ Complete in 0.4s
When to use --changed: Delta pushes are faster but require the server to have a recent full snapshot. Use full pushes periodically and delta pushes for frequent incremental updates. Watch mode uses delta pushes automatically.

Filtering Operations

Not every machine needs every config. Filters let you push and pull subsets of your configuration:

Filter by module or category
# Pull only shell and git configs configsync pull --filter modules:git,modules:zsh # Pull only cloud credentials configsync pull --filter category:cloud # Pull everything except editor configs configsync pull --filter exclude:category:editor # Push only recently changed modules configsync push --filter modules:zsh --changed

A developer tracking 500 files across 20 modules can pull just the 3 modules needed on a cloud VM, transferring 30 files instead of 500. This matters for speed and for minimizing what lands on shared or temporary machines.

Exclude Patterns on Add

Prevent bloat at the source by excluding unnecessary files when you add config directories:

Excluding noise files
# Add a config directory but skip logs and caches configsync add config ~/.config/mytool/ --exclude "*.log" --exclude "cache/*" # Track IDE settings but skip workspace files configsync add config ~/.config/JetBrains/ --exclude "*.xml.bak" --exclude "workspace.xml" # Skip common noise configsync add config ~/.config/k9s/ --exclude "*.tmp"

Fewer tracked files means faster hashing, smaller uploads, and cleaner state. Be deliberate about what you track — configuration files belong, logs and caches do not.

Watch Mode Optimization

Watch mode can become expensive if it monitors too many files. Focus it on the files you actually edit:

Optimized watch configuration
watch: enabled: true filter: - "~/.zshrc" - "~/.gitconfig" - "~/.config/starship.toml" debounce: 5 push_args: "--changed"

The watch filter tells ConfigSync to monitor only the listed files, not your entire tracked set. Combined with delta pushes via push_args, watch mode stays lightweight even when your total configuration set is large. Edit a file, wait five seconds, and only that file gets pushed.

Scale Without Slowdown

With content-hash caching, delta uploads, targeted filters, and exclude patterns, ConfigSync scales gracefully. The number of tracked files matters for the first push. After that, performance depends on how many files change between operations — and that number is almost always small. A developer with 1000 tracked files experiences the same sub-second push times as someone with 10, because the caching layer makes unchanged files free.

Ready to try ConfigSync?

Sync your entire dev environment across machines in minutes. Free forever for up to 3 devices.