MCPcopy Create free account
hub / github.com/neplextech/vectorizer / optimizeWithTiming

Function optimizeWithTiming

cli/index.mjs:220–230  ·  view source on GitHub ↗
(svg, options, label)

Source from the content-addressed store, hash-verified

218}
219
220async function optimizeWithTiming(svg, options, label) {
221 const start = performance.now();
222 const optimized = await optimize(svg, options);
223 const duration = performance.now() - start;
224 const delta = svg.length - optimized.length;
225
226 console.error(pc.green(`${label} in ${duration.toFixed(2)}ms`));
227 console.error(pc.dim(`Optimization length: ${svg.length} -> ${optimized.length} (${formatDelta(delta)} bytes)`));
228
229 return optimized;
230}
231
232function collectVectorizeChunks(start, { printChunks = false, showProgress = true } = {}) {
233 const chunks = printChunks ? null : [];

Callers 2

runVectorizeCommandFunction · 0.85
runOptimizeCommandFunction · 0.85

Calls 2

optimizeFunction · 0.85
formatDeltaFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…