Skip to content

Conversation

@masibw
Copy link
Owner

@masibw masibw commented Mar 7, 2021

We have created a pkgcache to know if we have already read the pkg, and if we have read the pkg and know if there is a query in the function, we skip Load.

-- following is not implemented because of stackoverflow ----
Before

go test -cpuprofile cpu2.prof -memprofile mem2.prof -bench ./...
PASS
ok  	github.com/masibw/goone	21.536s

スクリーンショット 2021-03-07 11 52 26

Ev2DxZLVcAM2Z5g

After

go test -cpuprofile cpu.prof -memprofile mem.prof -bench ./...
PASS
ok  	github.com/masibw/goone	4.895s

スクリーンショット 2021-03-07 14 04 11
スクリーンショット 2021-03-07 14 03 55

But this improvement is not enough.(I don't have any good idea)

If you run it on a large target, stack over flow will occur...

goroutine stack exceeds 1000000000-byte limit

@masibw masibw changed the base branch from master to develop March 7, 2021 05:01
@masibw masibw force-pushed the feature/mem_perf branch from b5df86c to d8e7836 Compare March 7, 2021 05:01
@masibw masibw changed the title Feature/mem perf パフォーマンスの改善 Mar 7, 2021
@masibw masibw changed the title パフォーマンスの改善 Improve performance Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants