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

optimization: Avoid costly getImplicitRole when explicitRole.role exists #1489

Merged
merged 1 commit into from Feb 16, 2024

Conversation

exoego
Copy link
Contributor

@exoego exoego commented Feb 15, 2024

Part of #1049

What is the purpose of this PR?

  • Fix bug
  • Fix typo
  • Update specs
  • Add new rule
  • Add new parser
  • Improve or refactor rules
  • Add a new core feature
  • Improve or refactor core features
  • Update documents
  • Others

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:

before after
image image

Checklist

Fill out the checks for the applicable purpose.

@YusukeHirao YusukeHirao merged commit a6df718 into markuplint:dev Feb 16, 2024
29 checks passed
@YusukeHirao
Copy link
Member

@exoego Thank you! Great!

@exoego exoego deleted the computed-role branch February 16, 2024 02:21
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 (@&#8203;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
[#&#8203;1493](https://togithub.com/markuplint/markuplint/issues/1493)

#### Fixed Bugs

- Fix parsing of preprocessor specific nodes that failed as comment
nodes
[#&#8203;1492](https://togithub.com/markuplint/markuplint/issues/1492)

#### What's Changed

- optimization: Remove redundant type check by
[@&#8203;exoego](https://togithub.com/exoego) in
[markuplint/markuplint#1479
- optimization: calculate line and col together by
[@&#8203;exoego](https://togithub.com/exoego) in
[markuplint/markuplint#1484
- optimization: Selector matching shortcut by
[@&#8203;exoego](https://togithub.com/exoego) in
[markuplint/markuplint#1485
- optimization: Avoid costly Selector#toString when selector logs are
disabled by [@&#8203;exoego](https://togithub.com/exoego) in
[markuplint/markuplint#1488
- optimization: Avoid costly getImplicitRole when explicitRole.role
exists by [@&#8203;exoego](https://togithub.com/exoego) in
[markuplint/markuplint#1489
- Fix parsing of preprocessor specific nodes that failed as comment
nodes by [@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1492
- Update 2024-02-18 by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1493

#### New Contributors

- [@&#8203;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
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1452
- Add `@markuplint/svelte-spec` by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1453
- Remove to require `decoding=async` from preset
`markuplint:performance` by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1456
- Move `character-reference` rule from `markuplint:recommended` preset
to `markuplint:recommended-static-html` by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1457
- Supporting for Alpine.js by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1459
- Add `heading-levels` rule by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1463
- Add the `privacy-policy` link type to the `link` element by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1464
- Add the `onpagereveal` event attribute to the `body` element by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1465
- Add "No nested same `<details>` name group" to preset by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1466
- Add "Require `title` attr in `<input pattern>`" to preset by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1467
- Add `no-consecutive-br` rule by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1468
- Add `no-duplicate-dt` rule by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1469
- Add `neighbor-popovers` rule by
[@&#8203;YusukeHirao](https://togithub.com/YusukeHirao) in
[markuplint/markuplint#1470
- Updates 2024-02-12 by
[@&#8203;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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants