Handling big files with sys.io.FileInput

50 views
Skip to first unread message

Renaud Bardet

unread,
May 20, 2013, 1:45:23 PM5/20/13
to haxe...@googlegroups.com
Hi list,

I'm writing a neko script to migrate a big xml file (~13Gb) to a db and I think I'm hitting the stream length limit,
I figured since FileInput.tell returns an Int that the reading head used is an Int and therefore a FileInput can only handle files as big as a Int (so 2^30-1 on neko ?)
is that right ?
Should there be a way to handle those big streams with a BigInt ?
also FileSystem.FileStat.size is an Int

Cheers,
Renaud

Nicolas Cannasse

unread,
May 20, 2013, 3:57:17 PM5/20/13
to haxe...@googlegroups.com
Le 20/05/2013 19:45, Renaud Bardet a �crit :
Yes, but it's not yet done. This requires using specific C API which
usually uses int64 values.

Best,
Nicolas

Renaud Bardet

unread,
May 20, 2013, 5:35:31 PM5/20/13
to haxe...@googlegroups.com
I had to write an equivalent script in python to meet the deadline (performing right now),
but I'm interested in having a solution to that, is it possible to open the file as a pipe ?
I guess I could read stdin and call my script with neko ingestor.n < my_catalog.xml

Le lundi 20 mai 2013 15:57:17 UTC-4, Nicolas Cannasse a écrit :
Le 20/05/2013 19:45, Renaud Bardet a �crit :

Cauê Waneck

unread,
May 20, 2013, 6:02:30 PM5/20/13
to haxe...@googlegroups.com
If you're using Haxe 3.0 RC, you can use the Java target and access Java's STD library for file handling. I think you can even access it by accessing sys.io.FileInput's private variables to find the 64-bit version of tell()


2013/5/20 Renaud Bardet <renaud...@gmail.com>

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages