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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/http: client is slow #4507
Labels
Comments
the redis package refers to https://github.com/alphazero/Go-Redis the mmsego package refers to https://github.com/Codefor/MMSEGO the config package refers to https://github.com/kless/goconfig the darts package refers to https://github.com/awsong/go-darts the code tree outputs like this: . |-- config | |-- all_test.go | |-- config.go | |-- error.go | |-- option.go | |-- read.go | |-- section.go | |-- type.go | `-- write.go |-- darts | |-- darts.go | `-- dawg.go |-- data | |-- all.gob | |-- brandId2Name.txt | |-- brandName2Id.txt | |-- brandNames.txt | |-- cid2name.txt | |-- cid2path.txt | |-- cid2tags.txt | |-- data.tar.gz | |-- id2newid.txt | |-- mmseg.so.64 | |-- pid2tags.txt | |-- pidsinfo.txt | |-- t.py | |-- tag2pids.txt | |-- tagName2Id.txt | |-- words.dic | |-- words.dic.bak | `-- words.lib |-- mmsego | `-- mmsego.go |-- rtde//the most important package | |-- dataSet.go | |-- ddurl.go | |-- result.go | |-- step.go | `-- userIntention.go |-- rtde.cfg//the config file |-- test | |-- fetch_perm_ids.py | |-- perm_id.txt | |-- redis_bench | |-- redis_bench.go | |-- redis_bench.py | `-- redis_bench_avg.py `-- userIntentionAPI.go//the main script Attachments:
|
The way to optimize your program is to remove sources of allocation from the profiles. Your profile http://yugaohe.sinaapp.com/rtdeAnalysis.html is actually a good source of data. For example redis's CreateRequestBytes should probably be passed in a destination buffer to append to, so that it can be reused. It could then also use AppendInt instead of Itoa, saving a few more allocations. I don't believe the client is that slow. I think you're just exercising the code by allocating a lot. I don't think there's a runtime bug here. You might want to try mailing the golang-nuts@googlegroups.com mailing list and point them to this issue so they can look at the graphs and code and make suggestions. Status changed to WorkingAsIntended. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by hk.yuhe:
Attachments:
The text was updated successfully, but these errors were encountered: