Skip to content

Conversation

KazariEX
Copy link
Member

@KazariEX KazariEX commented Jun 18, 2025

Originally, we held the inline TS ASTs within their respective attribute nodes. While this approach allowed them to persist during incremental updates of the template, when edits break the template structure and triggered a fallback to full updates, all inline TS would be re-parsed—even if their content remained entirely unchanged.

Now, we held these inline TS ASTs in a Map property of the template AST and perform cache checks when recomputing the template AST. This change brings two key benefits:

  1. Most inline TS ASTs will be reused during full updates.
  2. Inline TS with same content will share the same AST.
Copy link

pkg-pr-new bot commented Jun 18, 2025

Open in StackBlitz

vue-component-meta

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-meta@5435 

vue-component-type-helpers

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-type-helpers@5435 

@vue/language-core

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-core@5435 

@vue/language-plugin-pug

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-plugin-pug@5435 

@vue/language-server

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-server@5435 

@vue/language-service

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-service@5435 

vue-tsc

npm i https://pkg.pr.new/vuejs/language-tools/vue-tsc@5435 

@vue/typescript-plugin

npm i https://pkg.pr.new/vuejs/language-tools/@vue/typescript-plugin@5435 

commit: 44a24d0

@KazariEX KazariEX force-pushed the perf/full-cached-inline-ts-ast branch from 2103927 to 70e0b1e Compare June 18, 2025 21:03
@johnsoncodehk johnsoncodehk merged commit 073a7cb into vuejs:master Jun 20, 2025
6 checks passed
@KazariEX KazariEX deleted the perf/full-cached-inline-ts-ast branch June 20, 2025 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants