Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Finding references on a symbol with a large amount of references hangs the server #2

Open
Ruin0x11 opened this issue Mar 3, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@Ruin0x11
Copy link
Owner

Ruin0x11 commented Mar 3, 2018

Every request is currently handled synchronously by the server, so there should at least be some mechanism in place for a (preferably user-specified) cutoff time, and the capturing of partial results.

@tadfisher
Copy link
Contributor

RxJava (with RxKotlin) is basically perfect for this. Structure the command handlers to emit elements as an Observable, then cancel the subscription to that Observable on a timeout (keeping the emitted results):

command.execute()
  .subscribeOn(workerThread)
  .observeOn(handlerThread)
  .takeUntil(Observable.timer(timeout, TimeUnit.SECONDS))
  .toList()
  .subscribeBy { handleResult(it) }

@Ruin0x11
Copy link
Owner Author

Ruin0x11 commented Mar 4, 2018

Interesting, I'll definitely check it out when implementing server-to-client notifications.

@Ruin0x11 Ruin0x11 added the bug Something isn't working label Apr 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants