Skip to content

Commit

Permalink
Remove unnecessary file read on execution
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig committed Sep 26, 2024
1 parent af2aa6e commit 78f9031
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
1 change: 1 addition & 0 deletions src/client/pythonEnvironments/execution/runTask.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import { Disposable, Task } from 'vscode';
13 changes: 0 additions & 13 deletions src/client/terminals/codeExecution/codeExecutionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ export class CodeExecutionManager implements ICodeExecutionManager {
@inject(IServiceContainer) private serviceContainer: IServiceContainer,
) {}

public get onExecutedCode(): Event<string> {
return this.eventEmitter.event;
}

public registerCommands() {
[Commands.Exec_In_Terminal, Commands.Exec_In_Terminal_Icon, Commands.Exec_In_Separate_Terminal].forEach(
(cmd) => {
Expand Down Expand Up @@ -127,15 +123,6 @@ export class CodeExecutionManager implements ICodeExecutionManager {
fileToExecute = fileAfterSave;
}

try {
const contents = await this.fileSystem.readFile(fileToExecute.fsPath);
this.eventEmitter.fire(contents);
} catch {
// Ignore any errors that occur for firing this event. It's only used
// for telemetry
noop();
}

const executionService = this.serviceContainer.get<ICodeExecutionService>(ICodeExecutionService, 'standard');
await executionService.executeFile(fileToExecute, options);
}
Expand Down

0 comments on commit 78f9031

Please sign in to comment.