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

nsqlookupd: improved performance of registration db #584

Merged
merged 1 commit into from
May 7, 2015

Conversation

xiaost
Copy link
Contributor

@xiaost xiaost commented May 7, 2015

without '*' expression of topic & channel, we can fetch results from map directly.

it is another issue we found in #577, nsqlookupd eat up my CPUs 😢

@@ -113,9 +113,20 @@ func (r *RegistrationDB) RemoveRegistration(k Registration) {
delete(r.registrationMap, k)
}

func (r *RegistrationDB) needFilter(category string, key string, subkey string) bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can drop category from this function parameter list as it's not used.

@jehiah
Copy link
Member

jehiah commented May 7, 2015

Nice improvements. Squash in that one small fix and we'll merge this in.

without '*' expression of topic & channel,
we can fetch results from map directly.
@xiaost xiaost force-pushed the tmp-imprv-nsqlookupd-performance branch from 0f3eaef to 1d1f725 Compare May 7, 2015 13:31
@xiaost
Copy link
Contributor Author

xiaost commented May 7, 2015

@jehiah 👍 fixed

jehiah added a commit that referenced this pull request May 7, 2015
nsqlookupd: improved performance of registration db.
@jehiah jehiah merged commit 98fbcd1 into nsqio:master May 7, 2015
@xiaost xiaost deleted the tmp-imprv-nsqlookupd-performance branch May 7, 2015 14:14
@mreiferson mreiferson changed the title nsqlookupd: improved performance of registration db. nsqlookupd: improved performance of registration db Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants