# Anti-Dupe 3.7 — Performance & Lag Safety
Anti-Dupe 3.7 delivers a major performance overhaul based on live server profiling.
## Performance Improvements
- Moved canonical signed-item location writes off the main server thread.
- Added asynchronous, bounded, and coalesced database updates.
- Stable item locations and healthy ledger quantities now generate zero database writes.
- Persistent global-ledger reconciliation now runs through a separate maintenance connection.
- Inventory collection and scan finalization are distributed safely across multiple ticks.
- Scheduled, automatic, and administrator-requested scans now share the same bounded queue.
- Optional background work shares a configurable per-tick time allowance.
- Scanning automatically pauses during low TPS or high MSPT and resumes when the server recovers.
- Duplicate confirmation no longer performs an unrestricted same-tick inventory rescan.
- Pending database and scanning work is bounded to prevent unlimited backlogs.
The workload that exposed the previous scanner and SQLite bottlenecks was retested after these changes and maintained **19–20 TPS with 0–3 ms player ping**. Results will naturally vary depending on hardware, player count, plugins, configuration, and database backend.
## Detection Improvements
- Newest signed-item locations take effect immediately while database persistence completes.
- Older scan observations cannot overwrite newer canonical locations.
- Conflicting fingerprints cannot rebind an existing signed-item UUID.
- Moved duplicate candidates trigger a bounded follow-up scan instead of an expensive immediate world rescan.
- Time budgeting delays optional work when necessary without intentionally reducing the configured detection scope.
## Upgrade Instructions
1. Stop the server completely.
2. Remove every older Anti-Dupe JAR from the `plugins` folder.
3. Install `Anti-Dupe-3.7.jar`.
4. Perform a full server restart.
5. Keep the existing configuration, database, recovery records, and `identity.key`.
6. Compare your configuration with the bundled `config.yml` to review the new performance settings.
When network mode is enabled, upgrade every Paper backend together and ensure they continue sharing the same identity key and database.
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }