Skip to content

Commit 214860f

Browse files
RUM-16305: Change some hard-coded data limits
1 parent 70c67a3 commit 214860f

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

dd-sdk-android-core/src/main/kotlin/com/datadog/android/api/storage/FeatureStorageConfiguration.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ data class FeatureStorageConfiguration(
2424

2525
/**
2626
* Default storage configuration with the following parameters:
27-
* max item size = 512 KB,
28-
* max items per batch = 500,
29-
* max batch size = 4 MB,
27+
* max item size = 1 MB,
28+
* max items per batch = 1000,
29+
* max batch size = 5 MB,
3030
* old batch threshold = 18 hours.
3131
*/
3232
val DEFAULT: FeatureStorageConfiguration = FeatureStorageConfiguration(
33-
// 512 KB
34-
maxItemSize = 512L * 1024,
35-
maxItemsPerBatch = 500,
36-
// 4 MB
37-
maxBatchSize = 4L * 1024 * 1024,
33+
// 1 MB
34+
maxItemSize = 1024L * 1024,
35+
maxItemsPerBatch = 1000,
36+
// 5 MB
37+
maxBatchSize = 5L * 1024 * 1024,
3838
// 18 hours
3939
oldBatchThreshold = 18L * 60L * 60L * 1000L
4040
)

dd-sdk-android-core/src/main/kotlin/com/datadog/android/core/internal/persistence/file/FilePersistenceConfig.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ internal data class FilePersistenceConfig(
1919
val cleanupFrequencyThreshold: Long = CLEANUP_FREQUENCY_THRESHOLD_MS
2020
) {
2121
companion object {
22-
internal const val MAX_BATCH_SIZE: Long = 4L * 1024 * 1024 // 4 MB
23-
internal const val MAX_ITEMS_PER_BATCH: Int = 500
24-
internal const val MAX_ITEM_SIZE: Long = 512L * 1024 // 512 KB
22+
internal const val MAX_BATCH_SIZE: Long = 5L * 1024 * 1024 // 5 MB
23+
internal const val MAX_ITEMS_PER_BATCH: Int = 1000
24+
internal const val MAX_ITEM_SIZE: Long = 1024L * 1024 // 1 MB
2525
internal const val OLD_FILE_THRESHOLD: Long = 18L * 60L * 60L * 1000L // 18 hours
26-
internal const val MAX_DISK_SPACE: Long = 128 * MAX_BATCH_SIZE // 512 MB
26+
internal const val MAX_DISK_SPACE: Long = 128 * MAX_BATCH_SIZE // 640 MB
2727
internal const val MAX_DELAY_BETWEEN_MESSAGES_MS = 5000L
2828
internal const val CLEANUP_FREQUENCY_THRESHOLD_MS = 5000L // 5s
2929
}

0 commit comments

Comments
 (0)