synthesisui 0.16.271 → 0.16.272
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/connect.js +17 -2
- package/package.json +1 -1
package/dist/commands/connect.js
CHANGED
|
@@ -419,10 +419,25 @@ export async function connect(opts) {
|
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
await reportWhatIsLeft(root, { cli: opts.version });
|
|
422
|
+
/**
|
|
423
|
+
* O CUSTO DO HOOK, DITO SEM UM NÚMERO QUE NÃO É NOSSO.
|
|
424
|
+
*
|
|
425
|
+
* A frase prometia "about 0.7s per edit", de uma medição de 27/07. Medido em 21/08 no repositório do
|
|
426
|
+
* dono, cinco execuções: 2525 · 27 · 2513 · 2508 · 2521 ms - e a causa não é o nosso código.
|
|
427
|
+
* `npx synthesisui@<v> --version`, que nem chega no hook, custou 2555-2711ms na mesma máquina, e
|
|
428
|
+
* aquele repo tem 26 folhas de css. O hook inteiro foi medido em 84ms em 13/08, sobre 686 folhas.
|
|
429
|
+
*
|
|
430
|
+
* Ou seja: o número FIXO era o erro, porque ele descreve a rede de quem lê e não o que a gente faz.
|
|
431
|
+
* O que a frase passa a dizer é o que DOMINA (o npx resolvendo) e o ganho medido do caminho local:
|
|
432
|
+
* 2525ms -> 295ms num repo com o pacote em `node_modules`. "Ten times" era otimista; "several" é o
|
|
433
|
+
* que se sustenta.
|
|
434
|
+
*/
|
|
422
435
|
if (wired.command.startsWith("npx synthesisui@")) {
|
|
423
436
|
console.log("");
|
|
424
|
-
console.log(body("The hook runs through npx, which
|
|
425
|
-
console.log(body("
|
|
437
|
+
console.log(body("The hook runs through npx, which resolves this package against the"));
|
|
438
|
+
console.log(body("registry on every edit - that wait is the network, not the check itself"));
|
|
439
|
+
console.log(body("(the analysis is about 80ms). Adding synthesisui to your devDependencies"));
|
|
440
|
+
console.log(body("makes npx resolve it locally instead, which is several times faster;"));
|
|
426
441
|
console.log(body("run this again afterwards and it will switch by itself."));
|
|
427
442
|
}
|
|
428
443
|
}
|
package/package.json
CHANGED