-
Notifications
You must be signed in to change notification settings - Fork 80
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
refactor: Rewrite JS API to share server implementation of Flight/Barrage #5890
Conversation
// assert isSorted(); | ||
} | ||
|
||
public void appendRanges(List<Range> ranges, long firstItemSubindex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That this new method is unused is one of my qualms about this change - or at least is an opportunity to improve. A binary search when we get started on add/remove/shift, bulk adding as we encounter consecutive untouched ranges, or getting the index of the last range touched so we can bulk add the rest would let us skip ~O(n) long +
ops or Range.overlap (i.e. two compares) for each range. Not going to make a huge difference, compared to the work so far, but could buy us a little more breathing room.
Rewrites JS API Flight/Barrage to share code as much as possible with the JVM client/server implementation. Some classes are effectively copied with minor updates to function in the browser, such as WebBarrageStreamReader. Others offer alternative implementations to generic interfaces, like WebChunkReaderFactory. Finally, super source is added to handle classes in Deephaven, gRPC, and Java itself, to allow use of those types in the browser.
Notably, JS clients subscriptions are now the same implementation for both viewports and full table subscriptions. This change may degrade performance of viewports in some case relative to previous versions. To help mitigate this, in certain cases the configuration property
web.flattenViewport
may improve things. This lets the server instruct all clients to flatten their tables before subscribing.Fixes #188
Fixes #186