From dfc9d42154354d661da107ba40ea871bb55b7afa Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 11 Jan 2023 16:45:07 -0800 Subject: [PATCH] Fix uri transformer slowness over large buffers Fix #138784 --- src/vs/base/common/uriIpc.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/base/common/uriIpc.ts b/src/vs/base/common/uriIpc.ts index c8a4733a479f4..07daa360c54a3 100644 --- a/src/vs/base/common/uriIpc.ts +++ b/src/vs/base/common/uriIpc.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { VSBuffer } from 'vs/base/common/buffer'; import { MarshalledObject } from 'vs/base/common/marshalling'; import { MarshalledId } from 'vs/base/common/marshallingIds'; import { URI, UriComponents } from 'vs/base/common/uri'; @@ -125,6 +126,10 @@ function _transformIncomingURIs(obj: any, transformer: IURITransformer, revive: return revive ? URI.revive(transformer.transformIncoming(obj)) : transformer.transformIncoming(obj); } + if (obj instanceof VSBuffer) { + return null; + } + // walk object (or array) for (const key in obj) { if (Object.hasOwnProperty.call(obj, key)) {