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

startup performance: 200ms is too slow #83

Closed
client9 opened this Issue Aug 25, 2016 · 2 comments

Comments

Projects
None yet
1 participant
@client9
Owner

client9 commented Aug 25, 2016

Converting the word-list to a map: 80ms
Creating the strings.Replacer: 125ms

The first part is solved by generating the map in advance.
The second part is more problematic. It would be nice just serializing the internal structure of replacer and then unmarshalling. This would involve copying https://golang.org/src/strings/replace.go and modifying it so it can marshaled Lots of pointers but I don't think circular ... just a tree.

2016/08/25 04:40:12 map: 79.952131ms
2016/08/25 04:40:12 replacer: 125.917169ms

@client9

This comment has been minimized.

Show comment
Hide comment
@client9

client9 Aug 25, 2016

Owner

Down to around 150ms.

By making the map init smarter. Also makes runtime faster.

Owner

client9 commented Aug 25, 2016

Down to around 150ms.

By making the map init smarter. Also makes runtime faster.

@client9

This comment has been minimized.

Show comment
Hide comment
@client9

client9 Aug 31, 2016

Owner

It's improved.. closing for now.

Owner

client9 commented Aug 31, 2016

It's improved.. closing for now.

@client9 client9 closed this Aug 31, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment