Conversation
src/main-thread/main-thread.d.ts
Outdated
|
|
||
| declare const WORKER_DOM_DEBUG: boolean; | ||
| declare const IS_AMP: boolean; | ||
| declare const IS_SERVER: boolean; |
There was a problem hiding this comment.
🚲 🏚️ :
| declare const IS_SERVER: boolean; | |
| declare const DISABLE_TRANSFERS: boolean; |
There was a problem hiding this comment.
Thats true for now. But the higher level notion is that it is meant for usage on server instead of client
There was a problem hiding this comment.
WDYT of the new thing I did, which is kind of nice IMO. Attached to process.env.SERVER.
Edit: actually..i'm not sure if this works in client at all. testing now
Edit Edit: it works when I always provide the subsitutions
| }, | ||
| preventAssignment: true, | ||
| }), | ||
| replacePlugin({ debug: true }), |
There was a problem hiding this comment.
Is the debug: true supposed to be included here? Maybe based on a flag?
There was a problem hiding this comment.
This is configuration for the output file: dist/debug/main.mjs (scroll up a few lines to see that).
For this binary we want all of the debug code. Very similar to amphtml's mode
summary
Creates a super basic
benchmark.mjsfile for measuringcreateElementperformance.Then makes 4 small changes that each remove memory leaks and/or improve ctor performance
initial performance
opt: skip HTMLElement ctor store
opt: getter for CSSStyleDeclaration (lazy instantiation)
opt: class field loose transform
opt: remove minification step (note: I don't know why this has faster output)
cc @rcebulko