如何解决Windows shell 与 WSL2 Typescript 诊断解析时间
谁能解释下同一系统下Windows shell和WSL2在同一个项目下运行同一个命令的解析时间差?
如您所见,在文件、行等方面也存在一些差异。有没有办法加快 WSL2 解析时间?
tsc -project ./tsconfig.json --diagnostics
Windows 10 外壳(tsc 版本 3.1.2)
Files: 139
Lines: 35528
Nodes: 150245
Identifiers: 49306
Symbols: 38212
Types: 2460
I/O read: 0.05s
I/O write: 0.01s
Parse time: 0.74s
Bind time: 0.13s
Check time: 0.48s
Emit time: 0.13s
Total time: 1.48s
同一系统下的WSL2 Ubuntu 18 LTS(tsc 4.1.4版)
Files: 175
Lines: 39622
Nodes: 161997
Identifiers: 56416
Symbols: 40823
Types: 2795
Instantiations: 12267
Memory used: 76663K
I/O read: 1.13s
I/O write: 0.16s
Parse time: 14.45s
Bind time: 0.36s
Check time: 0.39s
Emit time: 0.32s
Total time: 15.52s
解决方法
这很可能是由于 Windows 驱动器的 WSL2 中的文件性能非常差(' Fetch the "Content"-DIV
Dim content As Object
Set content = HtmlDoc.getElementsByClassName("content")(0)
' Fetch the first table with that div
Dim table As Object
Set table = content.getElementsByTagName("table")(0)
' Loop over all <td>-Tags and print the content
Dim td As Object
For Each td In table.getElementsByTagName("td")
Debug.Print td.innerHTML
If td.Children.Length > 0 Then
' If <td> has children,fetch the first child and show the content
Dim child As Object
Set child = td.Children(0)
Debug.Print " We found a child: " & child.tagName,child.innerHTML
End If
Next
下的所有内容)。在此处查看 WSL2 的错误报告:https://github.com/microsoft/WSL/issues/4197
可能有一些解决方法,如果您需要在您的机器上从 Linux 构建,那么对我来说主要是使用 WSL1。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。