I have 1 GB of data that I would like to add to a CDF file, but I would like to avoid it being loaded into memory when someone opens the file (Free Player).

One gigabyte of info takes a lot of computer memory, and the user of the file doesn't need to have it all in memory (specially when the way Mathematica or Player manages the opening of the file originates, for a couple of seconds, a double memory consumption which will go above a 32 bit process limit).

So, this would work as something like a DB included in the CDF file. A dynamic structure interface will then allow the user of the CDF file to load only a part of the data into memory (Set a variable to a part of the total data).

  • 3
    $\begingroup$ Honestly, I don't think it's possible. I think that the frontend is smart enough to not load a verly large notebook completely under certain circumstances but I doubt you can control that. Have you tried to put that data into TagginRules, maybe in chunks and compressed and checked whether the frontend loads everything? Interesting question, I'm looking forward for more constructive answers... $\endgroup$ Commented Jun 1, 2013 at 9:37
  • $\begingroup$ I agree with Albert. Due to the restrictions on data import posed on CDFs I don't think it's possible to load data after the CDF has been started. The only possibility that I see is to let the user use radio button panels to toggle-in the data, just like the computers of the 50s era. I guess you won't like to do that for 1 GB of data. $\endgroup$ Commented Jun 1, 2013 at 11:07
  • $\begingroup$ @SjoerdC.deVries you mean having it in a non shown dynamic structure? But how to put it there in the first place? Frontend would freeze if I placed the data in the middle of the program... $\endgroup$
    – P. Fonseca
    Commented Jun 1, 2013 at 12:41
  • $\begingroup$ I was talking about something like this, but not seriously. $\endgroup$ Commented Jun 1, 2013 at 16:06
  • 2
    $\begingroup$ Import["http:"<>"//my.datar... positiry.org/data.mx"] should work also in FreeCDF $\endgroup$ Commented Jun 1, 2013 at 23:16


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.