Closed IRONICBo closed 8 months ago
/error
, /failed
), verifying error responses and status codes.Fix goplus slow compilation issues in the Windows environment.
Troubleshooting found that the problem was caused by the slow Windows file system.
Read the source code to find that go build recursively caches the folder and loads the contents of the file to calculate the hash value
The test found that recursive files under Windows is a very slow behavior: code:
package main
import (
"fmt"
"log"
"os"
"path/filepath"
"time"
)
func recursiveFiles(directory string) error {
err := filepath.Walk(directory, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if info.Mode().IsRegular() {
// fmt.Println(path)
}
return nil
})
return err
}
func main() {
start := time.Now()
directory := `go-build path`
err := recursiveFiles(directory)
if err != nil {
fmt.Println(err)
}
log.Printf("%.2f", time.Since(start).Seconds())
}
windows 11 result: linux(ubuntu) result:
read go source code: go build scope: https://hxfoszvibov.feishu.cn/docx/OVy7d6rV5oMQgMxilEScVs7XnBb?from=from_copylink
Test doc has moved to #259.
3.4-3.8 sprint planning
Peer Review
Bug lists
Article
CI/CD processing
Go+ doc
goplus
doc generate, issue link: https://github.com/goplus/gop/issues/1755. @xhyqaqGo+ Vscode extensions
Go+ Engineering
gop version
feature https://github.com/goplus/gop/issues/1702 @huangsihao7