-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
- Take this sourcemap Archive.zip (from https://github.com/vaclavHala/slow-sourcemaps) which contains a sourcemap from a large minified source
generatedPositionForthe source../src/extension.ts- It takes 24 seconds 🩸
const { TraceMap, generatedPositionFor } = require('./');
const src = require('fs').readFileSync('/Users/connor/Downloads/slow-sourcemaps/dist/extension.js.map', 'utf-8');
const tm = new TraceMap(JSON.parse(src));
const start = Date.now();
generatedPositionFor(tm, {source: '../src/extension.ts', line: 6, column: 0, bias: 1});
console.log('took', Date.now() - start);
Debugging through it, this looks like a pathological case of inserting 13k items into a massive line (for the minified source)
CPU profile: vscode-profile-2025-09-09-10-24-35.cpuprofile.txt
Originally reported on microsoft/vscode-js-debug#2265
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels