1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-01 16:51:13 -05:00
denoland-deno/ext
Bartek Iwańczuk 81293440be 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-10 12:58:18 +09:00
..
broadcast_channel refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
cache refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
console fix(core): introduce SafeRegExp to primordials (#17592) 2023-03-10 12:44:33 +09:00
crypto refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
fetch refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
ffi refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
flash refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
fs refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
http 1.31.1 (#17936) 2023-02-24 21:17:58 -05:00
io refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
napi refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
net refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
node refactor(runtime): conditionally register Extension with source files (#18068) 2023-03-10 12:58:18 +09:00
tls 1.31.1 (#17936) 2023-02-24 21:17:58 -05:00
url feat(ops): reland fast zero copy string arguments (#17996) 2023-03-10 12:46:24 +09:00
web refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
webgpu refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
webidl fix(core): introduce SafeRegExp to primordials (#17592) 2023-03-10 12:44:33 +09:00
websocket refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00
webstorage refactor(core): don't use Result in ExtensionBuilder::state (#18066) 2023-03-10 12:58:06 +09:00