mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1546838 - Remove migrations and all final remaining LMDB disk hits during startup, r=nanj,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D99324
This commit is contained in:
parent
331bf799c4
commit
cdc159cdd9
@ -214,13 +214,6 @@ const startupPhases = {
|
||||
read: 1,
|
||||
close: 1,
|
||||
},
|
||||
{
|
||||
// bug 1546838
|
||||
path: "ProfD:xulstore/data.mdb",
|
||||
condition: WIN,
|
||||
read: 1,
|
||||
write: 1,
|
||||
},
|
||||
],
|
||||
|
||||
"before opening first browser window": [
|
||||
@ -350,12 +343,6 @@ const startupPhases = {
|
||||
condition: WIN && !AppConstants.MOZILLA_OFFICIAL,
|
||||
stat: 1,
|
||||
},
|
||||
{
|
||||
// bug 1546838
|
||||
path: "ProfD:xulstore/data.mdb",
|
||||
condition: MAC,
|
||||
write: 1,
|
||||
},
|
||||
],
|
||||
|
||||
// We are at this phase once we are ready to handle user events.
|
||||
|
@ -602,12 +602,6 @@
|
||||
"minbytes": 0,
|
||||
"maxbytes": 702
|
||||
},
|
||||
"{profile}\\xulstore\\data.mdb": {
|
||||
"mincount": 0,
|
||||
"maxcount": 4,
|
||||
"minbytes": 0,
|
||||
"maxbytes": 608
|
||||
},
|
||||
"{profile}\\xulstore\\data.safe.bin": {
|
||||
"mincount": 0,
|
||||
"maxcount": 4,
|
||||
|
@ -11,7 +11,7 @@ use nserror::{nsresult, NS_ERROR_FAILURE};
|
||||
use nsstring::nsCString;
|
||||
use owned_value::owned_to_variant;
|
||||
use rkv::backend::{BackendInfo, SafeMode, SafeModeDatabase, SafeModeEnvironment};
|
||||
use rkv::{Migrator, OwnedValue, StoreError, StoreOptions, Value};
|
||||
use rkv::{OwnedValue, StoreError, StoreOptions, Value};
|
||||
use std::{
|
||||
path::Path,
|
||||
str,
|
||||
@ -199,7 +199,6 @@ impl Task for GetOrCreateTask {
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1531887
|
||||
let path = Path::new(str::from_utf8(&self.path)?);
|
||||
let rkv = manager.get_or_create(path, Rkv::new::<SafeMode>)?;
|
||||
Migrator::easy_migrate_lmdb_to_safe_mode(path, rkv.read()?)?;
|
||||
{
|
||||
let env = rkv.read()?;
|
||||
let load_ratio = env.load_ratio()?.unwrap_or(0.0);
|
||||
|
@ -11,7 +11,7 @@ use moz_task::is_main_thread;
|
||||
use nsstring::nsString;
|
||||
use once_cell::sync::Lazy;
|
||||
use rkv::backend::{SafeMode, SafeModeDatabase, SafeModeEnvironment};
|
||||
use rkv::{Migrator, StoreOptions, Value};
|
||||
use rkv::{StoreOptions, Value};
|
||||
use std::{
|
||||
collections::BTreeMap,
|
||||
fs::{create_dir_all, remove_file, File},
|
||||
@ -50,7 +50,6 @@ pub(crate) fn get_database() -> XULStoreResult<Database> {
|
||||
let xulstore_dir = get_xulstore_dir()?;
|
||||
let xulstore_path = xulstore_dir.as_path();
|
||||
let rkv = manager.get_or_create(xulstore_path, Rkv::new::<SafeMode>)?;
|
||||
Migrator::easy_migrate_lmdb_to_safe_mode(xulstore_path, rkv.read()?)?;
|
||||
let store = rkv.read()?.open_single("db", StoreOptions::create())?;
|
||||
Ok(Database::new(rkv, store))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user