-
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "registers" for pod data; add send! function (see #339)
Test case: #!/usr/bin/env boot (require '[boot.pod :as pod]) (def p (pod/make-pod)) (def x (into [] (range 0 1000000))) (prn (pod/with-eval-in p (count ~x))) This fails with "RuntimeException: Class file too large!" #!/usr/bin/env boot (require '[boot.pod :as pod]) (def p (pod/make-pod)) (def x (into [] (range 0 1000000))) (prn (pod/with-eval-in p (count ~(pod/send! x)))) This works, no problem.
- Loading branch information
Showing
2 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8f4eabd
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.
Hey :)
Did the streaming approach not work for some reason?
I was wondering if using something like nippy might also be a solution?
👍
8f4eabd
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.
The problem is that
eval
can't handle expressions over a certain size. It's not a problem of serializing the expression; it's a problem of the expression being too large when it gets to the other side and is deserialized and passed toeval
. The solution here is to stash the form somewhere and pass a reference to it inside the expression that will be passed to eval. This way the expression itself is bounded in size.