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

Wolfram Engineering: Avoid transferring/converting huge data when not explicitly requested #119

Open
holyjak opened this issue Sep 17, 2024 · 1 comment
Labels
enhancement New feature or request Wolfram Eng Need help/advice from Wolfram Engineering

Comments

@holyjak
Copy link
Member

holyjak commented Sep 17, 2024

Some Wolfram functions such as Import of a 400k CSV or VideFrameList may return huge data, and transferring that and parsing into JLink Expr and than Clojure is slow typically not really desired. In most cases you want to store them into a Wolfram-side variable and not transfer them back.

It would be good to notice that we are trying to transfer huge data and abort / shorten unless explicitly instructed not to. Similarly as println does when *print-length* / depth is set.

The big question is how do we detect this case... Not sure whether it is possible on the JVM side, without going through all the data. Is there perhaps some Wolfram fn that can tell us the "size" of the result, which we could call automatically (or for a list of "dangerous" functions) to find out the size before we start transferring all the data? Or is there some other way?

@holyjak holyjak added the enhancement New feature or request label Sep 17, 2024
@light-matters
Copy link
Contributor

An example of generating a lot of data is

  (-> path--video
      w/Video
      (w/VideoTrim [12 24])
     (w/VideoFrameList 50)

@holyjak holyjak added the Wolfram Eng Need help/advice from Wolfram Engineering label Sep 21, 2024
@holyjak holyjak changed the title Avoid transferring/converting huge data when not expicitly requested Wolfram Engineering: Avoid transferring/converting huge data when not expicitly requested Sep 21, 2024
@holyjak holyjak changed the title Wolfram Engineering: Avoid transferring/converting huge data when not expicitly requested Wolfram Engineering: Avoid transferring/converting huge data when not explicitly requested Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Wolfram Eng Need help/advice from Wolfram Engineering
Projects
None yet
Development

No branches or pull requests

2 participants