mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
debt - prefer our file service
This commit is contained in:
parent
0ccac8cf7c
commit
4b3340352f
|
@ -257,7 +257,7 @@ export async function main(argv: string[]): Promise<any> {
|
|||
addArg(argv, `--prof-startup-prefix`, filenamePrefix);
|
||||
addArg(argv, `--no-cached-data`);
|
||||
|
||||
fs.writeFileSync(filenamePrefix, argv.slice(-6).join('|'));
|
||||
writeFileSync(filenamePrefix, argv.slice(-6).join('|'));
|
||||
|
||||
processCallbacks.push(async _child => {
|
||||
|
||||
|
@ -329,7 +329,7 @@ export async function main(argv: string[]): Promise<any> {
|
|||
await extHost.stop();
|
||||
|
||||
// re-create the marker file to signal that profiling is done
|
||||
fs.writeFileSync(filenamePrefix, '');
|
||||
writeFileSync(filenamePrefix, '');
|
||||
|
||||
} catch (e) {
|
||||
console.error('Failed to profile startup. Make sure to quit Code first.');
|
||||
|
|
|
@ -8,7 +8,7 @@ import * as os from 'os';
|
|||
import { localize } from 'vs/nls';
|
||||
import { ParsedArgs } from 'vs/platform/environment/common/environment';
|
||||
import { join } from 'vs/base/common/path';
|
||||
import { writeFileSync } from 'fs';
|
||||
import { writeFileSync } from 'vs/base/node/pfs';
|
||||
|
||||
/**
|
||||
* This code is also used by standalone cli's. Avoid adding any other dependencies.
|
||||
|
|
|
@ -13,7 +13,6 @@ import { keys, ResourceMap, values } from 'vs/base/common/map';
|
|||
import { Schemas } from 'vs/base/common/network';
|
||||
import { StopWatch } from 'vs/base/common/stopwatch';
|
||||
import { URI as uri } from 'vs/base/common/uri';
|
||||
import * as pfs from 'vs/base/node/pfs';
|
||||
import { getNextTickChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { Client, IIPCOptions } from 'vs/base/parts/ipc/node/ipc.cp';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
|
@ -425,6 +424,7 @@ export class DiskSearch implements ISearchResultProvider {
|
|||
searchDebug: IDebugParams | undefined,
|
||||
@ILogService private readonly logService: ILogService,
|
||||
@IConfigurationService private readonly configService: IConfigurationService,
|
||||
@IFileService private readonly fileService: IFileService
|
||||
) {
|
||||
const timeout = this.configService.getValue<ISearchConfiguration>().search.maintainFileSearchCache ?
|
||||
Number.MAX_VALUE :
|
||||
|
@ -465,7 +465,7 @@ export class DiskSearch implements ISearchResultProvider {
|
|||
|
||||
textSearch(query: ITextQuery, onProgress?: (p: ISearchProgressItem) => void, token?: CancellationToken): Promise<ISearchComplete> {
|
||||
const folderQueries = query.folderQueries || [];
|
||||
return Promise.all(folderQueries.map(q => q.folder.scheme === Schemas.file && pfs.exists(q.folder.fsPath)))
|
||||
return Promise.all(folderQueries.map(q => this.fileService.exists(q.folder)))
|
||||
.then(exists => {
|
||||
if (token && token.isCancellationRequested) {
|
||||
throw canceled();
|
||||
|
@ -480,7 +480,7 @@ export class DiskSearch implements ISearchResultProvider {
|
|||
|
||||
fileSearch(query: IFileQuery, token?: CancellationToken): Promise<ISearchComplete> {
|
||||
const folderQueries = query.folderQueries || [];
|
||||
return Promise.all(folderQueries.map(q => q.folder.scheme === Schemas.file && pfs.exists(q.folder.fsPath)))
|
||||
return Promise.all(folderQueries.map(q => this.fileService.exists(q.folder)))
|
||||
.then(exists => {
|
||||
if (token && token.isCancellationRequested) {
|
||||
throw canceled();
|
||||
|
|
Loading…
Reference in a new issue