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

Streamed Lists and Dictionaries are updated every tick #452

Closed
lucaelin opened this issue Mar 19, 2018 · 2 comments
Closed

Streamed Lists and Dictionaries are updated every tick #452

lucaelin opened this issue Mar 19, 2018 · 2 comments
Labels
bug Something isn't working server:api
Milestone

Comments

@lucaelin
Copy link

Every streamed procedure that returns a list or dictionary will update it's value on every tick, even if nothing has changed "on the inside". I would suggest to deep-compare those types in order to reduce traffic as well as client performance (thinking of SerialIO and mobile devices here).

@djungelorm djungelorm added bug Something isn't working server:api labels Mar 19, 2018
@djungelorm
Copy link
Member

Confirmed the issue. That was the intended behaviour, but it appears I wrongly assumed that that was how Dictionary.Equals and List.Equals worked.

Relevant code is here: https://github.com/krpc/krpc/blob/master/server/src/Service/Stream.cs#L41

@djungelorm djungelorm added this to the 0.4.6 milestone Mar 19, 2018
@Bosek
Copy link

Bosek commented Mar 24, 2018

This bug is pretty annoying to be honest. Possible fix is using SequenceEqual I guess. Afaik a simple solution.

I'd write a fix by myself because of project I am working on, but krpc just won't compile on my machine for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server:api
Projects
None yet
Development

No branches or pull requests

3 participants