Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

(perf) WIP: TS incremental parsing#1192

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
dummdidumm wants to merge5 commits intomaster
base:master
Choose a base branch
Loading
fromts-incremental-parsing

Conversation

dummdidumm
Copy link
Member

@dummdidummdummdidumm commentedOct 3, 2021
edited
Loading

Implement getChangeRange of the ScriptSnapshot interface so TS can incrementally parse the result of svelte2tsx.
TODO:

  • Doesn't reliably work, gets into a broken state seemginly random after some time Update: Found a bug in the implementation, works now
  • Wasn't able to prove this is really faster (how to best test this?). Update: Tested this with VS Code's Dev Tools and it doesn't change much. It's about 2-5miliseconds that are saved, which feels like very little.@jasonlyu123 thoughts?

dummdidummand others added4 commitsOctober 3, 2021 11:20
Implement getChangeRange of the ScriptSnapshot interface so TS can incrementally parse the result of svelte2tsx.TODO:- Doesn't reliably work, gets into a broken state seemginly random after some time- Wasn't able to prove this is really faster (how to best test this?)

let diffStart = oldText.length - 1;
for (let i = 0; i < currentText.length; i++) {
if (oldText.charAt(i) !== currentText.charAt(i)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It's probably better to usecharCodeAt.chatAt will likely allocate intermediate strings.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@DanielRosenwasserDanielRosenwasserDanielRosenwasser left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@dummdidumm@DanielRosenwasser

[8]ページ先頭

©2009-2025 Movatter.jp