mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
various widget optimizations for faster note switching
This commit is contained in:
@@ -50,6 +50,8 @@ let maxKnownSyncId = 0;
|
||||
async function call(method, url, data, headers = {}) {
|
||||
let resp;
|
||||
|
||||
const start = Date.now();
|
||||
|
||||
if (utils.isElectron()) {
|
||||
const ipc = require('electron').ipcRenderer;
|
||||
const requestId = i++;
|
||||
@@ -74,6 +76,10 @@ async function call(method, url, data, headers = {}) {
|
||||
resp = await ajax(url, method, data, headers);
|
||||
}
|
||||
|
||||
const end = Date.now();
|
||||
|
||||
console.log(`${method} ${url} took ${end-start}ms`);
|
||||
|
||||
const maxSyncIdStr = resp.headers['trilium-max-sync-id'];
|
||||
|
||||
if (maxSyncIdStr && maxSyncIdStr.trim()) {
|
||||
|
||||
Reference in New Issue
Block a user