Comments (6)
This is mainly due to the performance of the import function (by https://pkg.go.dev/golang.org/x/tools). This has been solved before, but the burden was relatively heavy, so we gave up the optimization later. After v1.2.0 is released, we will pick up performance optimization again.
这个主要是由于 import 功能的性能导致,这个之前曾经解决过,但是负担比较重所以后来放弃了优化,在 v1.2.0 发布后,接下来我们会把性能优化重新捡起来。
from gop.
I use a mac, but it's not as exaggerated as you said. There may be other reasons why Windows is slow.
% cat t.gop
age := 10
echo "age = ${age}"
% time gop run t.gop
age = 10
gop run t.gop 0.39s user 0.85s system 85% cpu 1.448 total
from gop.
Thank you for your reply, Xu Da. I also tested on Win10's WSL, and the performance was slightly better. Here are the results:
>> time gop build a.gop
real 0m2.585s
user 0m0.512s
sys 0m0.912s
Then I tested the same command using PowerShell:
>> Measure-Command {gop build a.gop}
Days : 0
Hours : 0
Minutes : 0
Seconds : 5
Milliseconds : 405
Ticks : 54051775
TotalDays : 6.25599247685185E-05
TotalHours : 0.00150143819444444
TotalMinutes : 0.0900862916666667
TotalSeconds : 5.4051775
TotalMilliseconds : 5405.1775
感谢许大的回复,我也在Win10的WSL下做了测试,性能稍好一些,如下:
time gop build a.gop
real 0m2.585s
user 0m0.512s
sys 0m0.912s
然后我用PowerShell再做了同样命令的测试,如下:
Measure-Command {gop build a.gop}
Days : 0
Hours : 0
Minutes : 0
Seconds : 5
Milliseconds : 405
Ticks : 54051775
TotalDays : 6.25599247685185E-05
TotalHours : 0.00150143819444444
TotalMinutes : 0.0900862916666667
TotalSeconds : 5.4051775
TotalMilliseconds : 5405.1775
我没开杀毒软件,推测可能gop对Win系统的某些调用还能再优化
from gop.
The compilation speed of the latest version of Go+ has also been improved a lot. Compiling the complete Go+ tutorial (https://github.com/goplus/tutorial) has been increased by 50 times, and compiling all examples from the spx repository (https://github.com/goplus/spx) is also 10x faster.
At present, two things related to import are mainly optimized: 1) share importer, so that all projects import the same pkg only happen once. 2) Significantly improve the performance of Go+ init package and reduce a large number of unnecessary repeated checks.
from gop.
我通过源码编译的新版本,似乎性能没有变化,很奇怪:
PS D:\gop-1.2.2\bin> gop version
gop v1.2.2 windows/386
PS D:\gop-1.2.2\bin> Measure-Command {gop build a.gop}
TotalSeconds : 6.0107325
from gop.
This optimization is not related to windows.
from gop.
Related Issues (20)
- About v1.2.0-pre.1 release HOT 5
- Importing incorrect code can cause the lsp to crash HOT 1
- Go 1.22 support
- Add a build flag for dlv debugging
- call ellipsis by command style failed
- avoid cycle import a Go+ package
- call small letter method by define order HOT 1
- Proposal: Remove the logic of using VERSION file to generate `gop version` or move it as the second choice after git tag HOT 1
- It is recommended that go+ further enhance the stack information when errors occur. HOT 1
- gop fmt vs. gopfmt
- llgo - A Go compiler based on LLVM
- Godoc doesn't recognize function documentation generated by Go+ HOT 2
- Go+ documentation HOT 1
- Go+ Language Server's stability
- bug: Gop encountered unnecessary line breaks and annotation errors while generating yap code HOT 1
- generic type lamda params infer error
- bug: The code generated in {} will merge multiple lines of code into one line HOT 2
- JSX like syntax HOT 1
- Missed page https://github.com/goplus/gop/blob/main/doc/dsl-vs-sdf.md on homepage HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gop.