1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-26 17:19:06 -05:00
denoland-deno/cli/tools
Matt Mastracci 86c3c4f343
feat(core): initialize SQLite off-main-thread (#18401)
This gets SQLite off the flamegraph and reduces initialization time by
somewhere between 0.2ms and 0.5ms. In addition, I took the opportunity
to move all the cache management code to a single place and reduce
duplication. While the PR has a net gain of lines, much of that is just
being a bit more deliberate with how we're recovering from errors.

The existing caches had various policies for dealing with cache
corruption, so I've unified them and tried to isolate the decisions we
make for recovery in a single place (see `open_connection` in
`CacheDB`). The policy I chose was:

 1. Retry twice to open on-disk caches
 2. If that fails, try to delete the file and recreate it on-disk
3. If we fail to delete the file or re-create a new cache, use a
fallback strategy that can be chosen per-cache: InMemory (temporary
cache for the process run), BlackHole (ignore writes, return empty
reads), or Error (fail on every operation).

The caches all use the same general code now, and share the cache
failure recovery policy.

In addition, it cleans up a TODO in the `NodeAnalysisCache`.
2023-03-27 22:01:52 +00:00
..
coverage perf(core) Reduce script name and script code copies (#18298) 2023-03-21 22:33:12 +00:00
init refactor(init): remove CURRENT_STD_URL (#18375) 2023-03-23 03:11:18 +00:00
repl feat(cli): --ext parameter for run, compile, and bundle (#17172) 2023-03-22 10:15:53 -04:00
vendor feat(core): initialize SQLite off-main-thread (#18401) 2023-03-27 22:01:52 +00:00
bench.rs feat(bench): add --no-run flag (#18433) 2023-03-26 14:55:58 +00:00
bundle.rs feat(cli): --ext parameter for run, compile, and bundle (#17172) 2023-03-22 10:15:53 -04:00
check.rs perf(check): type check local files only when not using --all (#18329) 2023-03-21 18:19:42 -04:00
doc.rs fix(cli): don't store blob and data urls in the module cache (#18261) 2023-03-26 12:24:10 +03:00
fmt.rs feat(core): initialize SQLite off-main-thread (#18401) 2023-03-27 22:01:52 +00:00
info.rs feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
installer.rs refactor(core): resolve_url_or_path and resolve_url_or_path_deprecated (#18170) 2023-03-14 01:12:09 +00:00
lint.rs feat(core): initialize SQLite off-main-thread (#18401) 2023-03-27 22:01:52 +00:00
mod.rs chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
run.rs fix(cli): don't store blob and data urls in the module cache (#18261) 2023-03-26 12:24:10 +03:00
standalone.rs chore(test_util): replace tempdir code w/tempdir crate (#18340) 2023-03-22 12:55:19 -06:00
task.rs fix: lazily surface errors in package.json deps parsing (#17974) 2023-03-03 18:27:05 -04:00
test.rs fix(cli): don't store blob and data urls in the module cache (#18261) 2023-03-26 12:24:10 +03:00
upgrade.rs fix(cli): deno upgrade file permission (#18427) 2023-03-26 12:19:12 +03:00