Binary IO in RandomAccessFile super slow ?
794822Jul 6 2010 — edited Jul 8 2010I have measured the time spent by a simple PUT in a binary RandomAccessFile:
I open it in this way:
Bin_file = new RandomAccessFile(path_fichero, "rws");}
and this is the 'Put' method called:
+public boolean Put(float value){ +
+ try {+
+ Bin_file.writeFloat(value);+
+ return true;+
+ } catch (IOException e) {+
+ e.printStackTrace();+
+ return false;+
+}+
+}+
ok, if I call Put 26000 times it spents 2 minutes
The same code in the old VisualBasic 6.0 spents 0.14 seconds
Any Idea ?
Thanks