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

The UI seems to lock up if you tap an infinite lazy seq #17

Closed
l0st3d opened this issue Oct 16, 2020 · 6 comments
Closed

The UI seems to lock up if you tap an infinite lazy seq #17

l0st3d opened this issue Oct 16, 2020 · 6 comments

Comments

@l0st3d
Copy link

l0st3d commented Oct 16, 2020

I've not looked into it, but I assume it's trying to display the whole thing. It might be worth detecting this and implementing some pagination or something??

@l0st3d
Copy link
Author

l0st3d commented Oct 16, 2020

This is on an JVM, using CIDER.
;; CIDER 0.27.0snapshot (package: 20200813.2112), nREPL 0.8.0
;; Clojure 1.10.1, Java 14.0.1

@l0st3d
Copy link
Author

l0st3d commented Oct 16, 2020

Doing something like this

  (require '[portal.api :as portal])
  (portal/open)
  (portal/tap)
  (tap> (range))

takes longer than my patience to return, and seems to stop me from running cider-quit.

@djblue
Copy link
Owner

djblue commented Oct 16, 2020

Hi @l0st3d, this happens on the host side of things when the data is being serialized as transit before it's shipped up to the UI. I think if you (tap> (range)) in REBL, they truncate to 10k items, which would be a reasonable solution for portal as well. I tend not to run into this problem, so it isn't a priority for me right now, but if you'd like to submit a PR, I would be happy to review!

@djblue
Copy link
Owner

djblue commented Oct 17, 2020

@l0st3d I changed my mind and went ahead and implemented a solution in #18

@l0st3d
Copy link
Author

l0st3d commented Oct 23, 2020

That seems like a reasonable solution too. Will have a test. Many thanks.

Just out of interest, how much effort do you think implementing pagination would be?

@djblue
Copy link
Owner

djblue commented Nov 10, 2020

@l0st3d I just updated #18 to lazily fetch seqs. It does so in batches of 100. As you scroll, more data from the seq is fetched.

@djblue djblue closed this as completed Nov 13, 2020
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

No branches or pull requests

2 participants