Performance problem with read and parse large XML files
问题 I have a directory which contains several large XML files (total size is about 10 GB). Is there any way to iterate through the directory containing the XML files and read 50 byte by 50 byte and parse the XML files with high performance? func (mdc *Mdc) Loadxml(path string, wg sync.WaitGroup) { defer wg.Done() //var conf configuration file, err := os.Open(path) if err != nil { log.Fatal(err) } defer file.Close() scanner := bufio.NewScanner(file) buf := make([]byte, 1024*1024) scanner.Buffer