-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Performance improvement #9635
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
type/performance
Comments
ngaut
added
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
type/performance
labels
Mar 11, 2019
I will try to improve GetAllCharsets. it is so interesting. |
@hawkingrei Thanks, some tips here:
|
I'll try to improve |
Actually, you should modify the code in https://github.com/pingcap/parser/blob/master/charset/charset.go, and update the TiDB go.mod. |
@lkk2003rty Are you interested in this issue #9638? |
ngaut
changed the title
Performance improvement inside charset module
Performance improvement
Mar 11, 2019
yep, I can do it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
type/performance
There are some redundant computing in charset.go(https://github.com/pingcap/parser/blob/master/charset/charset.go), some of the functions may just return constants. There is no need to do compute every time if we save a map/slice and initialize them. Such as:
GetAllCharsets, GetCharsetInfoByID.
We may also change the type of argument from string to integer in GetCharsetDesc.
With better redesign, we can save more memory and CPU.
The text was updated successfully, but these errors were encountered: