mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
Add logging for MD language features (#152792)
This verbose logging will help track down inefficient calling patterns (such as recomputing stuff)
This commit is contained in:
@@ -4,11 +4,12 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { MdDocumentInfoCache } from './util/workspaceCache';
|
||||
import { ILogger } from './logging';
|
||||
import { IMdParser } from './markdownEngine';
|
||||
import { githubSlugifier, Slug, Slugifier } from './slugify';
|
||||
import { Disposable } from './util/dispose';
|
||||
import { isMarkdownFile } from './util/file';
|
||||
import { MdDocumentInfoCache } from './util/workspaceCache';
|
||||
import { MdWorkspaceContents, SkinnyTextDocument } from './workspaceContents';
|
||||
|
||||
export interface TocEntry {
|
||||
@@ -183,9 +184,11 @@ export class MdTableOfContentsProvider extends Disposable {
|
||||
constructor(
|
||||
parser: IMdParser,
|
||||
workspaceContents: MdWorkspaceContents,
|
||||
private readonly logger: ILogger,
|
||||
) {
|
||||
super();
|
||||
this._cache = this._register(new MdDocumentInfoCache<TableOfContents>(workspaceContents, doc => {
|
||||
this.logger.verbose('TableOfContentsProvider', `create - ${doc.uri}`);
|
||||
return TableOfContents.create(parser, doc);
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user