Skip to content
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

perf(util/gmeta): improve meta retrieving performance by adding cache for struct type #3857

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wwwfeng
Copy link
Contributor

@wwwfeng wwwfeng commented Oct 15, 2024

不知道理解的对不对
before:
before
after:
image

@wwwfeng
Copy link
Contributor Author

wwwfeng commented Oct 15, 2024

#3856

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


#3856

@wwwfeng wwwfeng changed the title add cache perf(util/gmeta): improve meta retrieving performance by adding cache for struct type Oct 15, 2024
@gqcn
Copy link
Member

gqcn commented Oct 15, 2024

related issue #3852

util/gmeta/gmeta.go Outdated Show resolved Hide resolved
util/gmeta/gmeta.go Show resolved Hide resolved
@gqcn
Copy link
Member

gqcn commented Oct 16, 2024

@wwwfeng 奇怪,我这基准测试性能还比加缓存前差了很多,而且还没发运行完
QQ_1729089095915

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@wwwfeng Strange, the performance of my benchmark test is still much worse than before adding cache, and it has not finished running yet.
QQ_1729089095915

@wwwfeng
Copy link
Contributor Author

wwwfeng commented Oct 16, 2024

@wwwfeng 奇怪,我这基准测试性能还比加缓存前差了很多,而且还没发运行完 QQ_1729089095915

奇怪,我这边测试无法复现
image

无法完成基准测试倒是像这个场景🙈
cachedMetadata.Load(reflectType)

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@wwwfeng Strange, the performance of my benchmark test is still much worse than before adding cache, and it has not finished running! [QQ_1729089095915](https://private-user-images.githubusercontent.com/26347176/377099657-a30d327e- 23cb-44c1-82de-ffafa5a7a852.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..xUgrhD93o_jPNDCs7wnHI9QWfotVep9FuBqmwz4IU3U)

Strange, my test here can’t reproduce it
image

Failure to complete the benchmark test is like this scenario🙈
cachedMetadata.Load(reflectType)

@gqcn
Copy link
Member

gqcn commented Oct 18, 2024

@wwwfeng 奇怪,我这基准测试性能还比加缓存前差了很多,而且还没发运行完 QQ_1729089095915

@hailaz @houseme @oldme-git @wln32 大伙一起试试呢,不晓得是不是我环境问题。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@wwwfeng Strange, the performance of my benchmark test is still much worse than before adding cache, and it has not finished running! [QQ_1729089095915](https://private-user-images.githubusercontent.com/26347176/377099657-a30d327e- 23cb-44c1-82de-ffafa5a7a852.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..FKOpFIlRIEm23yqOqPUAyHCQYjwr33-ANqQcWB5M7OM)

@hailaz @houseme @oldme-git @wln32 Let’s try it together. I don’t know if it’s a problem with my environment.

@gqcn gqcn added the discuss We need discuss to make decision. label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss We need discuss to make decision.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants