Skip to content

Commit efe5868

Browse files
committed
Attend to review comment
1 parent f925cda commit efe5868

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

glean/src/platform/qt/storage.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ const LOG_TAG = "platform.qt.Storage";
1313
// The name of the file that will hold the SQLite database.
1414
const DATABASE_NAME = "Glean";
1515
// Estimated size of database file.
16-
const ESTIMATED_DATABASE_SIZE = 150 * 2 * 10**3; // 300Kb
16+
// This estimate is calculated by (rounding off and)
17+
// doubling the 95th percentile of glean-core's database size on Android (150Kb).
18+
// https://glam.telemetry.mozilla.org/fenix/probe/glean_database_size/explore?app_id=release&timeHorizon=ALL
19+
const ESTIMATED_DATABASE_SIZE = 150 * 2 * 10**3; // 300Kb in bytes
1720
// Since we cannot have nesting in SQL databases,
1821
// we will have a database with only two columns: `key` and `value`.
1922
// The `key` column will contain the StorageIndex as a string, joined by SEPARATOR.
@@ -134,9 +137,7 @@ class QMLStore implements Store {
134137
const handle = LocalStorage.LocalStorage.openDatabaseSync(
135138
this.name, "1.0", `${this.name} Storage`, ESTIMATED_DATABASE_SIZE
136139
);
137-
138140
this.dbHandle = handle;
139-
return handle;
140141
} catch(e) {
141142
log(
142143
LOG_TAG,

0 commit comments

Comments
 (0)