extensionRunningLocationTracker.ts ×5

Frontier kind: Joint frontier

unlabeled · c_b0857904112b

1 test · 18505 LOC · 85 files · introduces 1 test · 34 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges34 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
2236 ranges18505 lines · 85 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 34 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.ts 34 introduced LOC · 5 ranges

Open complete file

169 const configuredAffinityToResultingAffinity = new Map<number, number>();
170 for (const extensionId of configuredExtensionIds) {
171 > const configuredAffinity = configuredAffinities[extensionId]; extensionRunningLocationTracker.ts
172 > if (typeof configuredAffinity !== 'number' || configuredAffinity <= 0 || Math.floor(configuredAffinity) !== configuredAffinity) {
173 this._logService.info(`Ignoring configured affinity for '${extensionId}' because the value is not a positive integer.`);
174 continue;
175 }
176 > const group = groups.get(extensionId); extensionRunningLocationTracker.ts
177 > if (!group) {
178 > // The extension is not known or cannot execute for this extension host kind
179 > continue;
180 > }
181 >
182 > const affinity1 = resultingAffinities.get(group);
183 > if (affinity1) {
184 > // Affinity for this group is already established
185 > configuredAffinityToResultingAffinity.set(configuredAffinity, affinity1);
186 > continue;
187 > }
188 >
189 > const affinity2 = configuredAffinityToResultingAffinity.get(configuredAffinity);
190 > if (affinity2) {
191 // Affinity for this configuration is already established
192 resultingAffinities.set(group, affinity2);
193 continue;
194 }
196 > if (!isInitialAllocation) {
197 this._logService.info(`Ignoring configured affinity for '${extensionId}' because extension host(s) are already running. Reload window.`);
198 continue;
199 }
201 > const affinity3 = ++lastAffinity;
202 > configuredAffinityToResultingAffinity.set(configuredAffinity, affinity3);
203 > resultingAffinities.set(group, affinity3);
204 > }
205 }
206
213
214 if (lastAffinity > 0 && isInitialAllocation) {
215 > for (let affinity = 1; affinity <= lastAffinity; affinity++) { extensionRunningLocationTracker.ts
216 > const extensionIds: ExtensionIdentifier[] = [];
217 > for (const extension of inputExtensions) {
218 > if (result.get(extension.identifier) === affinity) {
219 > extensionIds.push(extension.identifier);
220 > }
221 > }
222 > this._logService.info(`Placing extension(s) ${extensionIds.map(e => e.value).join(', ')} on a separate extension host.`);
223 > }
224 > }
225
226 return { affinities: result, maxAffinity: lastAffinity };