File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,10 @@ const LOG_TAG = "platform.qt.Storage";
1313// The name of the file that will hold the SQLite database.
1414const 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 ,
You can’t perform that action at this time.
0 commit comments