Skip to content

Commit e33586d

Browse files
committed
fix
1 parent ce0f363 commit e33586d

5 files changed

Lines changed: 4 additions & 18 deletions

File tree

packages/app/src/lib/_canvas.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,10 @@ export type DrawGraphAndBundledEdgesParams = {
8585
};
8686

8787
export function drawBundledEdges({ ctx, bundeledEdges }: DrawGraphAndBundledEdgesParams): void {
88-
console.time('Draw');
89-
9088
bundeledEdges.forEach(({ controlPoints }) => {
9189
drawBezierCurve(ctx, controlPoints, {
9290
width: 1,
9391
color: 'color(srgb 1 0 0 / 0.2)',
9492
});
9593
});
96-
console.timeEnd('Draw');
9794
}

packages/app/src/routes/app/(canvas)/+page.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@
6767
const bundeledEdges = await epb.bundle();
6868
console.timeEnd('EPB');
6969
70+
console.time('Draw');
7071
clearCanvas(context);
7172
drawBundledEdges({ ctx: context, bundeledEdges });
73+
console.timeEnd('Draw');
7274
}
7375
</script>
7476

packages/core/src/edge-path-bundling/floyd-warshall/gpu.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export class EdgePathBundlingGPUFloydWarshall implements EdgePathBundling {
4040
await this.#spanner.compute();
4141
}
4242

43-
if (this.#edgeWeightFactor !== this.#spanner.maxDistortion) {
43+
if (this.#maxDistortion !== this.#spanner.maxDistortion) {
4444
console.log('Max distortion changed. Recomputing Spanner');
45-
this.#spanner.maxDistortion = this.#edgeWeightFactor;
45+
this.#spanner.maxDistortion = this.#maxDistortion;
4646
await this.#spanner.compute();
4747
}
4848

@@ -73,8 +73,6 @@ export class EdgePathBundlingGPUFloydWarshall implements EdgePathBundling {
7373
}
7474
});
7575

76-
console.log('difference', difference.length);
77-
7876
const shortestPaths = await this.#floydWarshall.shortestPaths(difference);
7977

8078
const bundeledEdges: {

packages/core/src/shortest-path/floyd-warshall/FloydWarshall.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,6 @@ export class FloydWarshall {
198198
}
199199

200200
async shortestPaths(paths: { start: number; end: number }[]): Promise<(Path | null)[]> {
201-
console.time('Shortest Paths Buffer Data');
202-
203201
let pathsBuffer = this.#pathsBufferCache.get(paths.length);
204202

205203
const pathsBufferData = new BufferData(
@@ -232,10 +230,6 @@ export class FloydWarshall {
232230
});
233231
}
234232

235-
console.timeEnd('Shortest Paths Buffer Data');
236-
237-
console.time('Shortest Paths Buffer Compute');
238-
239233
const shortestPathsDistancesBuffer = this.#device.createBuffer({
240234
size: paths.length * 4,
241235
usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST | GPUBufferUsage.COPY_SRC,
@@ -315,9 +309,7 @@ export class FloydWarshall {
315309
shortestPathsNodesReadBuffer,
316310
Uint32Array
317311
);
318-
console.timeEnd('Shortest Paths Buffer Compute');
319312

320-
console.time('Shortest Paths Buffer Map');
321313
const ret: (Path | null)[] = [];
322314

323315
for (let i = 0; i < paths.length; i++) {
@@ -337,7 +329,6 @@ export class FloydWarshall {
337329
nodes,
338330
});
339331
}
340-
console.timeEnd('Shortest Paths Buffer Map');
341332

342333
return ret;
343334
}

packages/core/src/spanner/theta/gpu.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ export class ThetaSpanner extends Spanner {
4141
this.#k = this.#maxDistortion;
4242
// this.#k = this.#maxDistortion * 50;
4343

44-
console.log({ k: this.#k });
45-
4644
const positionsBufferData = new BufferData({ x: 'float', y: 'float' }, this.#graph.nodes.size);
4745

4846
this.#graph.nodes.forEach(({ x, y }, index) => {

0 commit comments

Comments
 (0)