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

Outline provider changes #210702

Open
3 tasks
DonJayamanne opened this issue Apr 18, 2024 · 1 comment
Open
3 tasks

Outline provider changes #210702

DonJayamanne opened this issue Apr 18, 2024 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-toc-outline

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Apr 18, 2024

Tasks

  1. a11y-partner
    Yoyokrazy amunger
@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented Apr 18, 2024

  • Limit number of cells processed?
    Should we not have a limit on the number of code & markdown cells we process when generating the outline.
    Assume users have 1000cells and 1000md cells, surely we shouldn't try to process all of these when attempting to generate the outline.
    Just as we limit the number of cells to 100 when generating the code symbols we might want to have a limit here too.
    https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.ts#L140

  • Get text by providing a range (or offset), etc
    Given the fact that we're generating outlines a lot and its been identified to be slow, we might be able to save a few MS by avoiding the use of cell.getText() and extract only a range of text.

const fullContent = cell.getText().substring(0, 10000);

Or perhaps we can instead just get the headers line by line (using the cell model API to get the lines at a time and then using the getMarkdownHeadersInCellFallbackToHtmlTags for each line,

@rebornix /cc

@Yoyokrazy Yoyokrazy added bug Issue identified by VS Code Team member as probable bug notebook-toc-outline labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug notebook-toc-outline
Projects
None yet
Development

No branches or pull requests

2 participants