From 2a538e0207b7d370ab9d4ad62fcf8d360c1a8fbf Mon Sep 17 00:00:00 2001 From: Matthias Behr Date: Wed, 6 Jan 2021 16:18:52 +0100 Subject: [PATCH] fix(defaults): lower default for maxNumberLogs to 400k The prev. 1mio leads to problems on a lot of machines. --- README.md | 2 +- package.json | 4 ++-- src/dltDocument.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6c8412e0..654cc194 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ The extension uses telemetry with two events (`activate` (no parameters) and `op This extension contributes the following settings: * `dlt-logs.fileExtensions`: Specifies the file extensions to use for file open dialog. Defaults to .dlt|.DLT. -* `dlt-logs.maxNumberLogs`: Specified the maximum number of DLT logs that get displayed in one page. If more logs exist - considering the active filters - a paging mechanism is in place that starts rendering a new page at 4/5th of the page boundary. Searching is limited to the visible page. Defaults to 1mio logs. Depending on your machines performance/RAM you might reduce/increase this. Best case is to find a limit/config where all logs fit into that range (use filter!). +* `dlt-logs.maxNumberLogs`: Specified the maximum number of DLT logs that get displayed in one page. If more logs exist - considering the active filters - a paging mechanism is in place that starts rendering a new page at 4/5th of the page boundary. Searching is limited to the visible page. Defaults to 0.4mio logs. Depending on your machines performance/RAM you might reduce/increase this. Best case is to find a limit/config where all logs fit into that range (use filter!). * `dlt-logs.reReadTimeout`: Specified the timeout in ms after opening the file before starting to parse the dlt file. If the file doesn't open, increase this to e.g. 5s. * `dlt-logs.columns`: Specifies which columns are visible. See example config. Usually doesn't need to be changed manually but by button "select columns". * `dlt-logs.filters`: Configures the filter that are available. diff --git a/package.json b/package.json index 20d73498..470bb6e0 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,8 @@ }, "dlt-logs.maxNumberLogs": { "type": "integer", - "default": 1000000, - "description": "Maximum number of DLT logs that are shown in one page. If more messages do exist a paging mechanism will reload at 4/5th the next chunk. You can only search within that page. Please consider using filter to stay within that limit. Defaults to 1'000'000." + "default": 400000, + "description": "Maximum number of DLT logs that are shown in one page. If more messages do exist a paging mechanism will reload at 4/5th the next chunk. You can only search within that page. Please consider using filter to stay within that limit. Defaults to 400'000." }, "dlt-logs.columns": { "type": "array", diff --git a/src/dltDocument.ts b/src/dltDocument.ts index 7e0a5189..0352843e 100644 --- a/src/dltDocument.ts +++ b/src/dltDocument.ts @@ -180,7 +180,7 @@ export class DltDocument { this.onDidChangeConfigConfigs(); const maxNrMsgsConf = vscode.workspace.getConfiguration().get('dlt-logs.maxNumberLogs'); - this._maxNrMsgs = maxNrMsgsConf ? maxNrMsgsConf : 1000000; // 1mio default + this._maxNrMsgs = maxNrMsgsConf ? maxNrMsgsConf : 400000; // 400k default this._text = `Loading dlt document from uri=${this._fileUri.toString()} with max ${this._maxNrMsgs} msgs per page...`;