Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to disable the check on memory usage of language server (Jedi) process #1156

Merged
merged 2 commits into from
Mar 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions news/2 Fixes/1036.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Add ability to disable the check on memory usage of language server (Jedi) process.
To turn off this check, add the following setting into your user or workspace settings (`settings.json`) file:
```json
"python.jediMemoryLimit": -1
```
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1007,8 +1007,8 @@
},
"python.jediMemoryLimit": {
"type": "number",
"default": "0",
"description": "Memory limit for the Jedi completion engine in megabytes. Zero (default) means 1024 MB",
"default": 0,
"description": "Memory limit for the Jedi completion engine in megabytes. Zero (default) means 1024 MB. -1 means unlimited (disable memory limit check)",
"scope": "resource"
},
"python.sortImports.path": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ export class StopWatch {
public get elapsedTime() {
return Date.now() - this.started;
}
public reset(){
this.started = Date.now();
}
}
2 changes: 1 addition & 1 deletion src/client/debugger/Common/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// tslint:disable:no-function-expression no-any no-invalid-this no-use-before-declare

import { DebugSession, StoppedEvent } from 'vscode-debugadapter';
import { StopWatch } from '../../common/stopWatch';
import { DEBUGGER_PERFORMANCE } from '../../telemetry/constants';
import { StopWatch } from '../../telemetry/stopWatch';
import { DebuggerPerformanceTelemetry } from '../../telemetry/types';
import { TelemetryEvent } from './Contracts';

Expand Down
2 changes: 1 addition & 1 deletion src/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { registerTypes as installerRegisterTypes } from './common/installer/serv
import { registerTypes as platformRegisterTypes } from './common/platform/serviceRegistry';
import { registerTypes as processRegisterTypes } from './common/process/serviceRegistry';
import { registerTypes as commonRegisterTypes } from './common/serviceRegistry';
import { StopWatch } from './common/stopWatch';
import { GLOBAL_MEMENTO, IDisposableRegistry, ILogger, IMemento, IOutputChannel, IPersistentStateFactory, WORKSPACE_MEMENTO } from './common/types';
import { registerTypes as variableRegisterTypes } from './common/variables/serviceRegistry';
import { BaseConfigurationProvider } from './debugger/configProviders/baseProvider';
Expand Down Expand Up @@ -53,7 +54,6 @@ import { activateUpdateSparkLibraryProvider } from './providers/updateSparkLibra
import * as sortImports from './sortImports';
import { sendTelemetryEvent } from './telemetry';
import { EDITOR_LOAD } from './telemetry/constants';
import { StopWatch } from './telemetry/stopWatch';
import { registerTypes as commonRegisterTerminalTypes } from './terminals/serviceRegistry';
import { ICodeExecutionManager } from './terminals/types';
import { BlockFormatProviders } from './typeFormatters/blockFormatProvider';
Expand Down
2 changes: 1 addition & 1 deletion src/client/formatters/autoPep8Formatter.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as vscode from 'vscode';
import { Product } from '../common/installer/productInstaller';
import { StopWatch } from '../common/stopWatch';
import { IConfigurationService } from '../common/types';
import { IServiceContainer } from '../ioc/types';
import { sendTelemetryWhenDone } from '../telemetry';
import { FORMAT } from '../telemetry/constants';
import { StopWatch } from '../telemetry/stopWatch';
import { BaseFormatter } from './baseFormatter';

export class AutoPep8Formatter extends BaseFormatter {
Expand Down
2 changes: 1 addition & 1 deletion src/client/formatters/yapfFormatter.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as vscode from 'vscode';
import { StopWatch } from '../common/stopWatch';
import { IConfigurationService, Product } from '../common/types';
import { IServiceContainer } from '../ioc/types';
import { sendTelemetryWhenDone } from '../telemetry';
import { FORMAT } from '../telemetry/constants';
import { StopWatch } from '../telemetry/stopWatch';
import { BaseFormatter } from './baseFormatter';

export class YapfFormatter extends BaseFormatter {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { inject, injectable } from 'inversify';
import * as path from 'path';
import { ConfigurationTarget, Uri, window } from 'vscode';
import { StopWatch } from '../../common/stopWatch';
import { IServiceContainer } from '../../ioc/types';
import { sendTelemetryEvent } from '../../telemetry';
import { PYTHON_INTERPRETER } from '../../telemetry/constants';
import { StopWatch } from '../../telemetry/stopWatch';
import { PythonInterpreterTelemetry } from '../../telemetry/types';
import { IInterpreterVersionService } from '../contracts';
import { IPythonPathUpdaterServiceFactory, IPythonPathUpdaterServiceManager } from './types';
Expand Down
Loading