Skip to content

perf: compiler performance optimization #9674

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

Merged
merged 56 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
21d322b
wip: setup
yyx990803 Nov 12, 2023
e610fdb
wip: strip xmlMode / htmlMode
yyx990803 Nov 12, 2023
ea08664
wip: remove unused options
yyx990803 Nov 12, 2023
16942a2
wip: port parser
yyx990803 Nov 13, 2023
081ca7e
wip: save
yyx990803 Nov 13, 2023
4529f9b
wip: refactor line / column generation
yyx990803 Nov 14, 2023
23448e0
wip: loc for elements
yyx990803 Nov 14, 2023
cb38786
wip: parse directives
yyx990803 Nov 14, 2023
2fbef69
wip: optimize condenseWhitespace
yyx990803 Nov 14, 2023
a8feccd
wip: parse directive in tokenizer
yyx990803 Nov 14, 2023
73373b9
wip: source location for props
yyx990803 Nov 15, 2023
fd50689
wip: modifiers
yyx990803 Nov 15, 2023
49db157
wip: remove foreignContext check
yyx990803 Nov 15, 2023
4306249
wip: remove htmlMode
yyx990803 Nov 15, 2023
dd02806
wip: check duplicated attributes
yyx990803 Nov 15, 2023
90a4db9
wip: parse interpolation
yyx990803 Nov 15, 2023
9d189bf
wip: pre tag handling
yyx990803 Nov 15, 2023
e1aaf97
wip: v-pre handling
yyx990803 Nov 15, 2023
08f5826
wip: refine element type
yyx990803 Nov 16, 2023
a28c650
wip: comments
yyx990803 Nov 16, 2023
a870aaf
wip: getting ready for textmode handling
yyx990803 Nov 16, 2023
ba5aa7a
perf: optimize makeMap
yyx990803 Nov 16, 2023
e54e0e1
wip: parseMode
yyx990803 Nov 16, 2023
04c0b33
chore: disable parser tests for now
yyx990803 Nov 16, 2023
d506584
perf: optimize away isBuiltInType
yyx990803 Nov 16, 2023
1f7c0ce
wip: parse mode
yyx990803 Nov 17, 2023
956beba
refactor: swap to new template parser
yyx990803 Nov 17, 2023
b7b310b
wip: pass all non-error parsing tests
yyx990803 Nov 17, 2023
eadf6f8
wip: more tests passing
yyx990803 Nov 18, 2023
a52b5f0
wip: pass all compiler-core tests
yyx990803 Nov 18, 2023
973de35
wip: tune perf
yyx990803 Nov 18, 2023
1021e33
wip: entities parsing in browser
yyx990803 Nov 18, 2023
47224c6
wip: pass more compiler-dom tests
yyx990803 Nov 19, 2023
10f7d10
feat(compiler-core): support specifying root namespace when parsing
yyx990803 Nov 19, 2023
1aec019
wip: pass all compiler-dom tests
yyx990803 Nov 19, 2023
13032e8
wip: pass all compiler-ssr tests
yyx990803 Nov 20, 2023
65831e7
wip: pass all compiler-sfc tests
yyx990803 Nov 20, 2023
cc90ee0
wip: decodeEntities test
yyx990803 Nov 20, 2023
6ea6477
wip: support reusing template ast from sfc descriptor
yyx990803 Nov 20, 2023
c88fa63
wip: treat template with preprocessor as plain text
yyx990803 Nov 20, 2023
4c78df0
refactor: fix v-bind no-exp shorthand for new parser
yyx990803 Nov 21, 2023
02e0205
refactor: better naming for baseCompile argument
yyx990803 Nov 21, 2023
63d92ff
wip: compiler-sfc should not attach ast on template with src import
yyx990803 Nov 21, 2023
94d1cf4
refactor: use more efficient walk for importUsageCheck
yyx990803 Nov 21, 2023
8f13ee6
wip: should parse sfc template with lang=html
yyx990803 Nov 21, 2023
66f0d0d
wip: force re-parse on reused sfc template ast
yyx990803 Nov 21, 2023
d29e8b5
wip: parse error tests
yyx990803 Nov 22, 2023
a3c1a08
wip: shorten some method names
yyx990803 Nov 22, 2023
bf95cf2
chore: document rationale for ignoring some parsing errors
yyx990803 Nov 22, 2023
7bdde97
wip: parser v2 compat
yyx990803 Nov 22, 2023
8c87718
wip: should not reuse AST when using custom compiler
yyx990803 Nov 22, 2023
d5c03b1
perf: optimize position cloning
yyx990803 Nov 23, 2023
c7a3d54
perf(compiler-sfc): remove magic-string trim on script
yyx990803 Nov 23, 2023
a95d76e
perf(codegen): optimize line / column calculation during codegen
yyx990803 Nov 23, 2023
8928473
perf(codegen): optimize source map generation
yyx990803 Nov 24, 2023
7b0cc28
chore: restructure parser files
yyx990803 Nov 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,023 changes: 741 additions & 3,282 deletions packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/compiler-core/__tests__/codegen.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import { PatchFlags } from '@vue/shared'
function createRoot(options: Partial<RootNode> = {}): RootNode {
return {
type: NodeTypes.ROOT,
source: '',
children: [],
helpers: new Set(),
components: [],
Expand Down
Loading