GeezerVison is showing github.com — Avoid checking `Scope.globals` multiple times by liuxingbaoyu · Pull Request #16619 · babel/babel
Conversation
liuxingbaoyu
commented
Jul 7, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
| Q |
A |
| Fixed Issues? |
Fixes #1, Fixes #2 |
| Patch: Bug Fix? |
|
| Major: Breaking Change? |
|
| Minor: New Feature? |
|
| Tests Added + Pass? |
Yes |
| Documentation PR Link |
|
| Any Dependency Changes? |
|
| License |
MIT |
Previously hasBinding was called on each parent scope, which resulted in multiple checks of Scope.globals and Scope.contextVariables.
This improvement is small, and I didn't notice a noticeable improvement in real-case-preset-env-typescript.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
liuxingbaoyu
changed the title
Avoid checking Scope.globals multiple times.
Avoid checking Scope.globals multiple times
Jul 7, 2024
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
} else if (typeof opts === "boolean") {
|
|
|
noGlobals = opts;
|
|
|
}
|
|
|
if (this.parentHasBinding(name, opts)) return true;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have other parentHasBinding usage? If not maybe we can deprecate and remove this method in Babel 8, as it is trivial to implement.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
liuxingbaoyu and nicolo-ribaudo reacted with thumbs up emoji
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has only this one use.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not label this as "performance", since the performance different is insignificant
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
liuxingbaoyu reacted with thumbs up emoji
This was referenced Aug 1, 2024
This was referenced Aug 1, 2024
This was referenced Aug 1, 2024
This was referenced Aug 2, 2024
[Snyk] Upgrade: , , , , , , , , classnames, docusaurus-lunr-search, react-markdown
AKJUS/OpenLineage#26
Open
[Snyk] Upgrade: , , , ajv, glob, eslint, minimist, handlebars, jsdom, katex, moment, prettier, winston, yargs, workbox-cli
virtual-labs/ph3-lab-mgmt#530
Open
[Snyk] Upgrade: , , , , , , , magic-string, , convert-source-map, source-map, graceful-fs, tslib, chokidar, , terser, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , brotli, core-js-bundle, diff, http-server, jasmine-core, jasmine, jquery, tmp, karma, karma-chrome-launcher, karma-firefox-launcher, karma-jasmine, karma-sourcemap-loader, selenium-webdriver, puppeteer, reflect-metadata, requirejs, rollup, shelljs, systemjs, tsickle, typescript, yargs
vinit-aikido/terragoat#58
Open
[Snyk] Upgrade: , , , , , , , magic-string, , convert-source-map, source-map, graceful-fs, tslib, chokidar, , terser, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , brotli, core-js-bundle, diff, http-server, jasmine-core, jasmine, jquery, tmp, karma, karma-chrome-launcher, karma-firefox-launcher, karma-jasmine, karma-sourcemap-loader, selenium-webdriver, puppeteer, reflect-metadata, requirejs, rollup, shelljs, systemjs, tsickle, typescript, yargs
Sonic269/App6#120
Open
[Snyk] Upgrade: lodash, , , , , , , , , , react, react-dom, semver, , , node-fetch, , , , babel-loader, cheerio, cookie-parser, mkdirp, copy-webpack-plugin, cross-env, directory-tree, dotenv, express, express-rate-limit, express-timeout-handler, flat, github-slugger, js-yaml, gray-matter, helmet, hot-shots, html-entities, linkinator, liquidjs, lunr-languages, mini-css-extract-plugin, morgan, redis, resolve-url-loader, rimraf, rss-parser, sass, sass-loader, style-loader, uuid, webpack
venkatarao-palaparthi/docs#455
Open
[Snyk] Upgrade: , , , , , , , , classnames, docusaurus-lunr-search, react-markdown
AKJUS/OpenLineage#28
Open
[Snyk] Upgrade: , , , , , , , magic-string, , convert-source-map, source-map, graceful-fs, tslib, chokidar, , terser, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , brotli, core-js-bundle, diff, http-server, jasmine-core, jasmine, jquery, tmp, karma, karma-chrome-launcher, karma-firefox-launcher, karma-jasmine, karma-sourcemap-loader, selenium-webdriver, puppeteer, reflect-metadata, requirejs, rollup, shelljs, systemjs, tsickle, typescript, yargs
Rashdamada/terragoat#5
Open
[Snyk] Upgrade: , , , , , , , magic-string, , convert-source-map, source-map, graceful-fs, tslib, chokidar, , terser, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , brotli, core-js-bundle, diff, http-server, jasmine-core, jasmine, jquery, tmp, karma, karma-chrome-launcher, karma-firefox-launcher, karma-jasmine, karma-sourcemap-loader, selenium-webdriver, puppeteer, reflect-metadata, requirejs, rollup, shelljs, systemjs, tsickle, typescript, yargs
vinit-aikido/terragoat#59
Open
[Snyk] Upgrade: , , , ajv, glob, eslint, minimist, handlebars, jsdom, katex, moment, prettier, winston, yargs, workbox-cli
virtual-labs/ph3-lab-mgmt#531
Open
[Snyk] Upgrade: , , , , , , , magic-string, , convert-source-map, source-map, graceful-fs, tslib, chokidar, , terser, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , brotli, core-js-bundle, diff, http-server, jasmine-core, jasmine, jquery, tmp, karma, karma-chrome-launcher, karma-firefox-launcher, karma-jasmine, karma-sourcemap-loader, selenium-webdriver, puppeteer, reflect-metadata, requirejs, rollup, shelljs, systemjs, tsickle, typescript, yargs
Sonic269/App6#121
Open
[Snyk] Upgrade: , , , ajv, glob, eslint, minimist, handlebars, jsdom, katex, moment, prettier, winston, yargs, workbox-cli
virtual-labs/ph3-lab-mgmt#532
Open
[Snyk] Upgrade: lodash, , , , , , , , , , react, react-dom, semver, , , node-fetch, , , , babel-loader, cheerio, cookie-parser, mkdirp, copy-webpack-plugin, cross-env, directory-tree, dotenv, express, express-rate-limit, express-timeout-handler, flat, github-slugger, js-yaml, gray-matter, helmet, hot-shots, html-entities, linkinator, liquidjs, lunr-languages, mini-css-extract-plugin, morgan, redis, resolve-url-loader, rimraf, rss-parser, sass, sass-loader, style-loader, uuid, webpack
venkatarao-palaparthi/docs#456
Open
[Snyk] Upgrade: lodash, , , , , , , , , , react, react-dom, semver, , , node-fetch, , , , babel-loader, cheerio, cookie-parser, mkdirp, copy-webpack-plugin, cross-env, directory-tree, dotenv, express, express-rate-limit, express-timeout-handler, flat, github-slugger, js-yaml, gray-matter, helmet, hot-shots, html-entities, linkinator, liquidjs, lunr-languages, mini-css-extract-plugin, morgan, redis, resolve-url-loader, rimraf, rss-parser, sass, sass-loader, style-loader, uuid, webpack
venkatarao-palaparthi/docs#457
Open
[Snyk] Upgrade: lodash, , , , , , , , , , react, react-dom, semver, , , node-fetch, , , , babel-loader, cheerio, cookie-parser, mkdirp, copy-webpack-plugin, cross-env, directory-tree, dotenv, express, express-rate-limit, express-timeout-handler, flat, github-slugger, js-yaml, gray-matter, helmet, hot-shots, html-entities, linkinator, liquidjs, lunr-languages, mini-css-extract-plugin, morgan, redis, resolve-url-loader, rimraf, rss-parser, sass, sass-loader, style-loader, uuid, webpack
venkatarao-palaparthi/docs#458
Open
This was referenced Sep 22, 2024
[Snyk] Upgrade: lodash, , , , , , , , , , react, react-dom, semver, , , node-fetch, , , , babel-loader, cheerio, cookie-parser, mkdirp, copy-webpack-plugin, cross-env, directory-tree, dotenv, express, express-rate-limit, express-timeout-handler, flat, github-slugger, js-yaml, gray-matter, helmet, hot-shots, html-entities, linkinator, liquidjs, lunr-languages, mini-css-extract-plugin, morgan, redis, resolve-url-loader, rimraf, rss-parser, sass, sass-loader, style-loader, uuid, webpack
venkatarao-palaparthi/docs#459
Open
[Snyk] Upgrade: lodash, , , , , , , , , , react, react-dom, semver, , , node-fetch, , , , babel-loader, cheerio, cookie-parser, mkdirp, copy-webpack-plugin, cross-env, directory-tree, dotenv, express, express-rate-limit, express-timeout-handler, flat, github-slugger, js-yaml, gray-matter, helmet, hot-shots, html-entities, linkinator, liquidjs, lunr-languages, mini-css-extract-plugin, morgan, redis, resolve-url-loader, rimraf, rss-parser, sass, sass-loader, style-loader, uuid, webpack
venkatarao-palaparthi/docs#460
Open
Reviewers
JLHwung
JLHwung approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|