You probably shouldn't just include the file which means it will have to be parsed and the function compiled etc. It will be much faster to just read a file containing the data.
This link might be useful: https://en.wikibooks.org/wiki/Introducing_Julia/Working_with_text_files#Writing_and_reading_array_to_and_from_a_file On Monday, March 21, 2016 at 8:15:02 PM UTC+1, Eduardo Lenz wrote: > > Hi. > > I am trying to load a 180 x 1025 matrix of floats, defined in a .jl file, > like > > function Data() > data = [1E-4 ....... 3.2E-5 > ..... ..... > ..... 0.0 ] > end > > The simple act of including this file takes 50s in my computer and, when > the function > is called, > > data = Data() > > it takes more than two hours to finally crash without warning. > > I can easily create such matrix with rand(180,1025), such that memory is > not > a problem. I can also use it with a smaller number of lines without any > issues. > > It is a known limitation or am I doing something wrong here ? > > I am using the last 0.4.3 Windows version (downloaded directly from the > page) > > Thanks. >
