提交 ad86b598 编写于 作者: J Johannes Rieken

move perf-mark for local storage access to index.js

上级 8fa044a8
......@@ -96,14 +96,19 @@ function showPartsSplash(configuration) {
keep = true;
}
let structure = window.localStorage.getItem(key);
// TODO@Ben remove me after a while
perf.mark('willAccessLocalStorage');
let storage = window.localStorage;
perf.mark('didAccessLocalStorage');
let structure = storage.getItem(key);
if (structure) {
let splash = document.createElement('div');
splash.innerHTML = structure;
document.body.appendChild(splash);
}
if (!keep) {
window.localStorage.removeItem(key);
storage.removeItem(key);
}
}
......
......@@ -195,10 +195,7 @@ function createStorageService(workspaceService: IWorkspaceContextService, enviro
if (disableStorage) {
storage = inMemoryLocalStorageInstance;
} else {
// TODO@Ben remove me after a while
perf.mark('willAccessLocalStorage');
storage = window.localStorage;
perf.mark('didAccessLocalStorage');
}
return new StorageService(storage, storage, workspaceId, secondaryWorkspaceId);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册