1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00
denoland-deno/ext
Bartek Iwańczuk d24c6ea27f
refactor(runtime): conditionally register Extension with source files (#18068)
Since we are snapshotting extension source at build time, there's no
need to define list of sources for the extension at runtime.

This commit changes "deno_node" extension by removing "init_polyfill"
function in favor of "init_polyfill_ops_and_esm()" and "init_polyfill_ops()".

The former is used during snapshot and when "deno_runtime" is compiled
with "dont_create_runtime_snapshot" cargo feature flag. The latter is used
when running a worker from an existing snapshot.

This is a start of a bigger refactor to all extensions - thanks to this
change, we don't have to iterate over all defined source files for extension at
runtime, and because of that we don't have to create a filepath for each of the
source files. It's not a big deal, but we are iterating over 300 files on each start,
and concatenating 3 strings before creating a "PathBuf" for ~200 of them.
This is already visible on the startup flamegraphs and should be avoided.
2023-03-08 12:43:26 +01:00
..
broadcast_channel refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
cache refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
console fix(core): introduce SafeRegExp to primordials (#17592) 2023-03-01 08:14:16 +09:00
crypto refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
fetch refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
ffi refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
flash refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
fs refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
http chore: forward v1.31.1 release commit to main (#17939) 2023-02-24 22:37:46 -05:00
io refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
napi refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
net refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
node refactor(runtime): conditionally register Extension with source files (#18068) 2023-03-08 12:43:26 +01:00
tls chore: forward v1.31.1 release commit to main (#17939) 2023-02-24 22:37:46 -05:00
url feat(ops): reland fast zero copy string arguments (#17996) 2023-03-03 19:04:10 +05:30
web refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
webgpu refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
webidl fix(core): introduce SafeRegExp to primordials (#17592) 2023-03-01 08:14:16 +09:00
websocket refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00
webstorage refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-07 22:37:37 +01:00