Selaa lähdekoodia

Delays the custom view to improve startup time

main
Eric Amodio 7 vuotta sitten
vanhempi
commit
3be416faf0
5 muutettua tiedostoa jossa 14 lisäystä ja 9 poistoa
  1. +1
    -0
      CHANGELOG.md
  2. +1
    -1
      package.json
  3. +3
    -1
      src/commands.ts
  4. +1
    -0
      src/constants.ts
  5. +8
    -7
      src/extension.ts

+ 1
- 0
CHANGELOG.md Näytä tiedosto

@ -27,6 +27,7 @@ ATTENTION! To support multi-root workspaces some underlying fundamentals had to
- Optimizes event handling, executing git commands, and general processing to improve performance and reduce any lag
- Optimizes current line hover annotations to only be computed on hover (i.e. lazily evaluated) to reduce the compute required when changing lines
- Protects credentials from possibly being affected by poor network conditions via Git Credential Manager (GCM) for Windows environment variables
- Delays (slightly) the initial loading of the `GitLens` custom view to improve startup performance
### Fixed
- Fixes jumpy code lens when deleting characters from a line with a Git code lens

+ 1
- 1
package.json Näytä tiedosto

@ -2162,7 +2162,7 @@
{
"id": "gitlens.gitExplorer",
"name": "GitLens",
"when": "gitlens:enabled && gitlens:hasRepository && config.gitlens.gitExplorer.enabled"
"when": "gitlens:enabled && gitlens:gitExplorer && gitlens:hasRepository && config.gitlens.gitExplorer.enabled"
}
]
}

+ 3
- 1
src/commands.ts Näytä tiedosto

@ -1,5 +1,5 @@
'use strict';
import { ExtensionContext } from 'vscode';
import { commands, ExtensionContext } from 'vscode';
import { AnnotationController } from './annotations/annotationController';
import { CurrentLineController } from './currentLineController';
import { CodeLensController } from './codeLensController';
@ -58,6 +58,8 @@ export function configureCommands(
currentLineController: CurrentLineController,
codeLensController: CodeLensController
): void {
context.subscriptions.push(commands.registerTextEditorCommand('gitlens.computingFileAnnotations', () => { }));
context.subscriptions.push(new Commands.CloseUnchangedFilesCommand(git));
context.subscriptions.push(new Commands.OpenChangedFilesCommand(git));
context.subscriptions.push(new Commands.ExternalDiffCommand(git));

+ 1
- 0
src/constants.ts Näytä tiedosto

@ -28,6 +28,7 @@ export enum CommandContext {
AnnotationStatus = 'gitlens:annotationStatus',
CanToggleCodeLens = 'gitlens:canToggleCodeLens',
Enabled = 'gitlens:enabled',
GitExplorer = 'gitlens:gitExplorer',
GitExplorerAutoRefresh = 'gitlens:gitExplorer:autoRefresh',
GitExplorerFilesLayout = 'gitlens:gitExplorer:files:layout',
GitExplorerView = 'gitlens:gitExplorer:view',

+ 8
- 7
src/extension.ts Näytä tiedosto

@ -1,6 +1,5 @@
'use strict';
// import { Objects } from './system';
import { commands, ExtensionContext, extensions, languages, window, workspace } from 'vscode';
import { ExtensionContext, extensions, languages, window, workspace } from 'vscode';
import { AnnotationController } from './annotations/annotationController';
import { CodeLensLocations, Configuration, IConfig, LineHighlightLocations } from './configuration';
import { ApplicationInsightsKey, CommandContext, ExtensionKey, GlobalState, QualifiedExtensionId, setCommandContext } from './constants';
@ -66,23 +65,25 @@ export async function activate(context: ExtensionContext) {
const annotationController = new AnnotationController(context, git, gitContextTracker);
context.subscriptions.push(annotationController);
const codeLensController = new CodeLensController(context, git, gitContextTracker);
context.subscriptions.push(codeLensController);
const currentLineController = new CurrentLineController(context, git, gitContextTracker, annotationController);
context.subscriptions.push(currentLineController);
context.subscriptions.push(new Keyboard());
const codeLensController = new CodeLensController(context, git, gitContextTracker);
context.subscriptions.push(codeLensController);
context.subscriptions.push(workspace.registerTextDocumentContentProvider(GitContentProvider.scheme, new GitContentProvider(context, git)));
context.subscriptions.push(languages.registerCodeLensProvider(GitRevisionCodeLensProvider.selector, new GitRevisionCodeLensProvider(context, git)));
context.subscriptions.push(window.registerTreeDataProvider('gitlens.gitExplorer', new GitExplorer(context, git)));
context.subscriptions.push(commands.registerTextEditorCommand('gitlens.computingFileAnnotations', () => { }));
context.subscriptions.push(new Keyboard());
configureCommands(context, git, annotationController, currentLineController, codeLensController);
// Constantly over my data cap so stop collecting initialized event
// Telemetry.trackEvent('initialized', Objects.flatten(cfg, 'config', true));
// Slightly delay enabling the explorer to not stop the rest of GitLens from being usable
setTimeout(() => setCommandContext(CommandContext.GitExplorer, true), 1000);
}
// this method is called when your extension is deactivated

Ladataan…
Peruuta
Tallenna