Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(fslib): add throwIfNoEntry support #4475

Merged
merged 1 commit into from
Jul 12, 2022
Merged

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented May 20, 2022

What's the problem this PR addresses?

Our filesystems doesn't support throwIfNoEntry.

Fixes #4283

How did you fix it?

Implemented support for it in the various filesystems.

Benchmark results

TSC_PATH="$(yarn bin tsc)" hyperfine \
  "node -r ./.pnp-before.cjs $TSC_PATH --noEmit" \
  "node -r ./.pnp-after.cjs $TSC_PATH --noEmit"
Benchmark 1: node -r ./.pnp-before.cjs /berry/.yarn/cache/typescript-patch-837e16e609-8c1dfb967c.zip/node_modules/typescript/bin/tsc --noEmit
  Time (mean ± σ):      7.752 s ±  0.208 s    [User: 14.269 s, System: 0.413 s]
  Range (min … max):    7.491 s …  8.142 s    10 runs

Benchmark 2: node -r ./.pnp-after.cjs /berry/.yarn/cache/typescript-patch-837e16e609-8c1dfb967c.zip/node_modules/typescript/bin/tsc --noEmit
  Time (mean ± σ):      7.577 s ±  0.056 s    [User: 14.019 s, System: 0.393 s]
  Range (min … max):    7.491 s …  7.680 s    10 runs

Summary
  'node -r ./.pnp-after.cjs /berry/.yarn/cache/typescript-patch-837e16e609-8c1dfb967c.zip/node_modules/typescript/bin/tsc --noEmit' ran
    1.02 ± 0.03 times faster than 'node -r ./.pnp-before.cjs /berry/.yarn/cache/typescript-patch-837e16e609-8c1dfb967c.zip/node_modules/typescript/bin/tsc --noEmit'
ESLINT_PATH="$(yarn bin eslint)" hyperfine \
  "node -r ./.pnp-before.cjs $ESLINT_PATH --max-warnings 0 \"./**/*.@(tsx|ts|js)\"" \
  "node -r ./.pnp-after.cjs $ESLINT_PATH --max-warnings 0 \"./**/*.@(tsx|ts|js)\""
Benchmark 1: node -r ./.pnp-before.cjs /berry/.yarn/cache/eslint-npm-8.2.0-6d0abafe92-c01e8a76de.zip/node_modules/eslint/bin/eslint.js --max-warnings 0 "./**/*.@(tsx|ts|js)"
  Time (mean ± σ):     14.233 s ±  0.471 s    [User: 22.903 s, System: 0.564 s]
  Range (min … max):   13.883 s … 15.416 s    10 runs

Benchmark 2: node -r ./.pnp-after.cjs /berry/.yarn/cache/eslint-npm-8.2.0-6d0abafe92-c01e8a76de.zip/node_modules/eslint/bin/eslint.js --max-warnings 0 "./**/*.@(tsx|ts|js)"
  Time (mean ± σ):     14.005 s ±  0.072 s    [User: 22.612 s, System: 0.527 s]
  Range (min … max):   13.869 s … 14.114 s    10 runs

Summary
  'node -r ./.pnp-after.cjs /berry/.yarn/cache/eslint-npm-8.2.0-6d0abafe92-c01e8a76de.zip/node_modules/eslint/bin/eslint.js --max-warnings 0 "./**/*.@(tsx|ts|js)"' ran
    1.02 ± 0.03 times faster than 'node -r ./.pnp-before.cjs /berry/.yarn/cache/eslint-npm-8.2.0-6d0abafe92-c01e8a76de.zip/node_modules/eslint/bin/eslint.js --max-warnings 0 "./**/*.@(tsx|ts|js)"'

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@merceyz merceyz requested a review from arcanis as a code owner May 20, 2022 21:54
@merceyz merceyz changed the title feat(fslib): add throwIfNoEntry feat(fslib): add throwIfNoEntry support May 20, 2022
arcanis
arcanis previously approved these changes May 22, 2022
@merceyz merceyz requested a review from arcanis May 23, 2022 10:39
@merceyz

This comment was marked as outdated.

@merceyz merceyz force-pushed the merceyz/feat/throwIfNoEntry branch 2 times, most recently from 2f2a86d to 560ef7e Compare June 29, 2022 14:33
@merceyz merceyz force-pushed the merceyz/feat/throwIfNoEntry branch from 560ef7e to 3aacce4 Compare July 8, 2022 17:45
@merceyz merceyz force-pushed the merceyz/feat/throwIfNoEntry branch from 3aacce4 to e02bb5d Compare July 12, 2022 14:18
@merceyz merceyz enabled auto-merge (squash) July 12, 2022 15:08
@merceyz merceyz merged commit 1f39ba3 into master Jul 12, 2022
@merceyz merceyz deleted the merceyz/feat/throwIfNoEntry branch July 12, 2022 15:08
merceyz added a commit that referenced this pull request Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: ZipFS doesn't implement throwIfNoEntry which is slowing down tsc
2 participants