Skip to content

Commit

Permalink
Fix uri transformer slowness over large buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Jan 12, 2023
1 parent 5070034 commit dfc9d42
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vs/base/common/uriIpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit dfc9d42

Please sign in to comment.