Best Practices for Optimizing Performance
Copyleaks is designed for scalability and high performance, handling large workloads efficiently. To get the best results from your integration, follow these best practices to optimize speed, reduce bottlenecks, and maximize efficiency.
Use Network Data Compression
Section titled “Use Network Data Compression”Transmitting large amounts of data over the internet slows down performance. Compressing data can reduce payload size by up to 70%, speeding up processing times.
Enable Request Compression
Section titled “Enable Request Compression”Compress the data before sending it to Copyleaks and add this header:
Content-Encoding: gzip
This is especially useful when submitting large files.
Enable Response Compression
Section titled “Enable Response Compression”To receive compressed responses from Copyleaks, include this header in your request:
Accept-Encoding: gzip, compress
This ensures faster data transfer between your system and Copyleaks.
Disable Unused Features
Section titled “Disable Unused Features”Copyleaks offers many configurable features, but enabling unnecessary ones can slow down scans. Only enable what you need.
Some features to disable if not needed:
Feature | Description | Recommendation |
---|---|---|
properties.includeHtml | Includes results in HTML format | Disable if plain text is enough. |
properties.pdf.create | Generates a PDF report | Turn off if you don’t need a PDF. |
properties.expiration | Defines how long scan data is stored | Use 7 days or less for optimal speed. |
properties.filters | Narrows search results | Customize filters to improve scan efficiency. |
Submit Scans at an Optimal Rate
Section titled “Submit Scans at an Optimal Rate”Copyleaks runs on cloud infrastructure, dynamically scaling resources based on demand. However, submitting too many requests at once can reduce efficiency.
Avoid Overloading the System
Section titled “Avoid Overloading the System”- Instead of submitting all documents at once, send them gradually at a controlled rate (
N
calls per second). - If handling large volumes (e.g., 1M+ files), adjust to the maximum allowed rate limit (see Rate Limit Policy).
Prevent Slow Start Issues
Section titled “Prevent Slow Start Issues”- Don’t flood the system with a sudden burst of requests.
- Instead, start with a low rate and gradually increase to maintain stable performance.
Adjust Sensitivity for Speed vs. Accuracy
Section titled “Adjust Sensitivity for Speed vs. Accuracy”Copyleaks supports different sensitivity levels, balancing speed and comprehensiveness based on your needs.
Set the properties.sensitivityLevel
value based on priority:
Level | Focus | Best For |
---|---|---|
1 | Speed | Quick scans, minimal checks. |
3 (default) | Balanced | Most use cases. |
5 | Comprehensive | Deep analysis, high accuracy. |
Reuse Your Authentication Token
Section titled “Reuse Your Authentication Token”Each JWT token generated during login is valid for 48 hours.
For more information on obtaining a new token, refer to the Login API.