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

Improve perf of notebook search #188556

Closed
andreamah opened this issue Jul 22, 2023 · 3 comments
Closed

Improve perf of notebook search #188556

andreamah opened this issue Jul 22, 2023 · 3 comments
Assignees
Labels
debt Code quality issues search Search widget and operation issues
Milestone

Comments

@andreamah
Copy link
Contributor

andreamah commented Jul 22, 2023

This issue is here to track cleanup of closed notebook search (#173726).

Notably, this includes:

@andreamah andreamah added feature-request Request for new features or functionality search Search widget and operation issues labels Jul 22, 2023
@andreamah andreamah added this to the August 2023 milestone Jul 22, 2023
@andreamah andreamah self-assigned this Jul 22, 2023
@andreamah
Copy link
Contributor Author

Note: we should be aware of how many calls to the ext host we make; with the current implementation, we make one call per notebook, but this can be quite bad in remote scenarios.

_data = await serializer.dataToNotebook(bytes);

@andreamah
Copy link
Contributor Author

Ideally, there would be another ext host function adjacent to this one that takes a mapping of URI to VSBuffer and multiple buffers can be handled at once.

async $dataToNotebook(handle: number, bytes: VSBuffer, token: CancellationToken): Promise<SerializableObjectWithBuffers<NotebookDataDto>> {
const serializer = this._notebookSerializer.get(handle);
if (!serializer) {
throw new Error('NO serializer found');
}
const data = await serializer.serializer.deserializeNotebook(bytes.buffer, token);
return new SerializableObjectWithBuffers(typeConverters.NotebookData.from(data));
}

This would require changing ExtHostNotebookShape.

export interface ExtHostNotebookShape extends ExtHostNotebookDocumentsAndEditorsShape {
$provideNotebookCellStatusBarItems(handle: number, uri: UriComponents, index: number, token: CancellationToken): Promise<INotebookCellStatusBarListDto | undefined>;
$releaseNotebookCellStatusBarItems(id: number): void;
$dataToNotebook(handle: number, data: VSBuffer, token: CancellationToken): Promise<SerializableObjectWithBuffers<NotebookDataDto>>;
$notebookToData(handle: number, data: SerializableObjectWithBuffers<NotebookDataDto>, token: CancellationToken): Promise<VSBuffer>;
$saveNotebook(handle: number, uri: UriComponents, versionId: number, options: files.IWriteFileOptions, token: CancellationToken): Promise<INotebookPartialFileStatsWithMetadata>;
}

@andreamah andreamah modified the milestones: August 2023, September 2023 Aug 28, 2023
@andreamah andreamah added debt Code quality issues and removed feature-request Request for new features or functionality labels Sep 1, 2023
@andreamah andreamah modified the milestones: October 2023, November 2023 Oct 23, 2023
@andreamah
Copy link
Contributor Author

Fixed by #192358

@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues search Search widget and operation issues
Projects
None yet
Development

No branches or pull requests

1 participant