Hi,
I have an array of strings where each string is a stream of multiple tables. And the final step of my function is to create and return a dictionary:
function readTables(str)
nStrs = split(str,"\r\n%T\t")
fHead=nStrs[1]
fTail="%E"
nStrs[end]=replace(nStrs[end],r"%E.*"=>"")
tableStrings=nStrs[2:end]
tableNames=match.(r"^[A-Z]+",tableStrings)
tableNames=[x.match for x in tableNames]
dictTables=Dict(tableNames.=>CSV.read.(IOBuffer.(tableStrings),delim="\t",header=2, type=String))
end
#map(readTables,values(contentP6))
But when i run the map line above, the browser just hangs. I’m using Julia 1.4.2 / Pluto via Chrome. The size of the string array values(contentP6)
is about 1.7Gb, 461 elements.
May I know:
- Is Dict of 2D Arrays the right way to store these tables?
- How to improve the code for better performance?