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

subscription registry fixes and improvements #780

Merged
merged 12 commits into from
Sep 20, 2017
Merged

subscription registry fixes and improvements #780

merged 12 commits into from
Sep 20, 2017

Conversation

ronag
Copy link

@ronag ronag commented Aug 6, 2017

So the general idea here is to reduce the number of allocations and lookups and improve iteration performance.

@Kashee-R Kashee-R added the ready label Aug 6, 2017

const names = this._names.get(socket) || new Set()
if (names.size === 0) {
this._names.set(socket, names)
socket.once('close', this._onSocketClose)
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be once per socket and not subscription

Copy link
Author

@ronag ronag Aug 7, 2017

Choose a reason for hiding this comment

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

@yasserf: It is once per socket. _names gives the set of all subscription names for a specific socket.

@ronag
Copy link
Author

ronag commented Aug 12, 2017

@yasserf: Any feedback on this? Would be curious to see some performance numbers from your benchmark suite.

@yasserf
Copy link
Contributor

yasserf commented Aug 12, 2017

Will be looking to get those public soon, generally looks great, thank you!

@ronag
Copy link
Author

ronag commented Aug 12, 2017

Not sure why the last commit causes failure. Would appreciate some help debugging that.


if (this._subscriptionListener) {
this._subscriptionListener.onSubscriptionRemoved(
subscription.ame,
Copy link
Contributor

Choose a reason for hiding this comment

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

typo?

@yasserf
Copy link
Contributor

yasserf commented Aug 12, 2017

could it be because

https://github.com/deepstreamIO/deepstream.io/blob/master/src/record/record-handler.js#L658

and u removed the silent flag for unsubscribing?

@yasserf yasserf merged commit 8392481 into deepstreamIO:master Sep 20, 2017
@yasserf
Copy link
Contributor

yasserf commented Sep 20, 2017

Sorry for making this take so long, code looks awesome! Hoping to get results on it soon

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.

None yet

4 participants