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
optimization: Avoid costly getImplicitRole when explicitRole.role exists #1489
Merged
+9
−8
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YusukeHirao
approved these changes
Feb 16, 2024
@exoego Thank you! Great! |
shinGangan
pushed a commit
to shinGangan/_nuxt-markuplint
that referenced
this pull request
Feb 19, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@markuplint/ml-config](https://togithub.com/markuplint/markuplint) | [`^4.0.1` -> `^4.1.1`](https://renovatebot.com/diffs/npm/@markuplint%2fml-config/4.0.1/4.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@markuplint%2fml-config/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@markuplint%2fml-config/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@markuplint%2fml-config/4.0.1/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@markuplint%2fml-config/4.0.1/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@markuplint/vue-parser](https://togithub.com/markuplint/markuplint) | [`^4.0.2` -> `^4.1.1`](https://renovatebot.com/diffs/npm/@markuplint%2fvue-parser/4.0.2/4.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@markuplint%2fvue-parser/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@markuplint%2fvue-parser/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@markuplint%2fvue-parser/4.0.2/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@markuplint%2fvue-parser/4.0.2/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@markuplint/vue-spec](https://togithub.com/markuplint/markuplint) | [`^4.0.1` -> `^4.0.2`](https://renovatebot.com/diffs/npm/@markuplint%2fvue-spec/4.0.1/4.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@markuplint%2fvue-spec/4.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@markuplint%2fvue-spec/4.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@markuplint%2fvue-spec/4.0.1/4.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@markuplint%2fvue-spec/4.0.1/4.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [markuplint](https://togithub.com/markuplint/markuplint) | [`^4.0.3` -> `^4.1.1`](https://renovatebot.com/diffs/npm/markuplint/4.0.3/4.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/markuplint/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/markuplint/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/markuplint/4.0.3/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/markuplint/4.0.3/4.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>markuplint/markuplint (@​markuplint/ml-config)</summary> ### [`v4.1.1`](https://togithub.com/markuplint/markuplint/releases/tag/v4.1.1) [Compare Source](https://togithub.com/markuplint/markuplint/compare/@markuplint/ml-config@4.1.0...@markuplint/ml-config@4.1.1) #### Update specs Add `shadowrootclonable` attribute to the `template` element [#​1493](https://togithub.com/markuplint/markuplint/issues/1493) #### Fixed Bugs - Fix parsing of preprocessor specific nodes that failed as comment nodes [#​1492](https://togithub.com/markuplint/markuplint/issues/1492) #### What's Changed - optimization: Remove redundant type check by [@​exoego](https://togithub.com/exoego) in [markuplint/markuplint#1479 - optimization: calculate line and col together by [@​exoego](https://togithub.com/exoego) in [markuplint/markuplint#1484 - optimization: Selector matching shortcut by [@​exoego](https://togithub.com/exoego) in [markuplint/markuplint#1485 - optimization: Avoid costly Selector#toString when selector logs are disabled by [@​exoego](https://togithub.com/exoego) in [markuplint/markuplint#1488 - optimization: Avoid costly getImplicitRole when explicitRole.role exists by [@​exoego](https://togithub.com/exoego) in [markuplint/markuplint#1489 - Fix parsing of preprocessor specific nodes that failed as comment nodes by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1492 - Update 2024-02-18 by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1493 #### New Contributors - [@​exoego](https://togithub.com/exoego) made their first contribution in [markuplint/markuplint#1479 **Full Changelog**: markuplint/markuplint@v4.1.0...v4.1.1 ### [`v4.1.0`](https://togithub.com/markuplint/markuplint/releases/tag/v4.1.0) [Compare Source](https://togithub.com/markuplint/markuplint/compare/@markuplint/ml-config@4.0.1...@markuplint/ml-config@4.1.0) #### New features ##### New Parser - **Supporting for [Alpine.js](https://alpinejs.dev/)** - Parser: `@markuplint/alpine-parser` - Spec: `@markuplint/alpine-parser/spec` ##### New Rules - Add [`heading-levels`](https://markuplint.dev/docs/rules/heading-levels) rule - Add [`no-consecutive-br`](https://markuplint.dev/docs/rules/no-consecutive-br) rule - Add [`no-duplicate-dt`](https://markuplint.dev/docs/rules/no-duplicate-dt) rule - Add [`neighbor-popovers`](https://markuplint.dev/docs/rules/neighbor-popovers) rule #### Update Specs - Add the `privacy-policy` link type to the `link` element - Add the `onpagereveal` event attribute to the `body` element - Add `deprecated` flag to the `usemap` attribute of the `object` element #### Update Preset Config - Remove to require `decoding=async` from preset `markuplint:performance` - Add "No nested same `<details>` name group" to preset - Add "Require `title` attr in `<input pattern>`" to preset - Add new rules([`heading-levels`](https://markuplint.dev/docs/rules/heading-levels), [`no-consecutive-br`](https://markuplint.dev/docs/rules/no-consecutive-br), [`no-duplicate-dt`](https://markuplint.dev/docs/rules/no-duplicate-dt), and, [`neighbor-popovers`](https://markuplint.dev/docs/rules/neighbor-popovers) rules to preset #### Fixed Bugs - Fix element type detection in Astro and Vue #### What's Changed - Fix element type detection by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1452 - Add `@markuplint/svelte-spec` by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1453 - Remove to require `decoding=async` from preset `markuplint:performance` by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1456 - Move `character-reference` rule from `markuplint:recommended` preset to `markuplint:recommended-static-html` by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1457 - Supporting for Alpine.js by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1459 - Add `heading-levels` rule by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1463 - Add the `privacy-policy` link type to the `link` element by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1464 - Add the `onpagereveal` event attribute to the `body` element by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1465 - Add "No nested same `<details>` name group" to preset by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1466 - Add "Require `title` attr in `<input pattern>`" to preset by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1467 - Add `no-consecutive-br` rule by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1468 - Add `no-duplicate-dt` rule by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1469 - Add `neighbor-popovers` rule by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1470 - Updates 2024-02-12 by [@​YusukeHirao](https://togithub.com/YusukeHirao) in [markuplint/markuplint#1471 **Full Changelog**: markuplint/markuplint@v4.0.3...v4.1.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/shinGangan/nuxt-markuplint). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOTEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE5MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of #1049
What is the purpose of this PR?
Description
getComputedRole
is one of heavy computations.I noticed that implicit roles are not used on some cases.
So, this PR puts
getImplicitRole
off until it is needed.The total process time of
getImplicitRole
(🟦 Blue rectangles) is now reduced:Checklist
Fill out the checks for the applicable purpose.
@markuplint/config-presets