[Mono-bugs] [Bug 577749] Hanging on the serialization of a big (more than 1 Gb) array

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Feb 27 07:04:06 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=577749

http://bugzilla.novell.com/show_bug.cgi?id=577749#c1


--- Comment #1 from Yury Serdyuk <Yury at serdyuk.botik.ru> 2010-02-27 12:04:03 UTC ---
I have studied the problem further and observed that indeed
there is a fast growing of serialization time for float array
size of >= 270 204 922 elements.

Below is a corresponding protocol:

bash-3.2$ mono BigSerializationTest.exe 270204920
Serialization time = 1.271595 secs.
bash-3.2$ mono BigSerializationTest.exe 270204921
Serialization time = 1.236961 secs.
bash-3.2$ mono BigSerializationTest.exe 270204922
Serialization time = 2.433673 secs.
bash-3.2$ mono BigSerializationTest.exe 270204923
Serialization time = 2.425419 secs.
bash-3.2$ mono BigSerializationTest.exe 270204924
Serialization time = 2.44311 secs.
bash-3.2$ mono BigSerializationTest.exe 270204950
Serialization time = 2.846783 secs.
bash-3.2$ mono BigSerializationTest.exe 270204980
Serialization time = 2.84799 secs.
bash-3.2$ mono BigSerializationTest.exe 270205000
Serialization time = 2.845296 secs.
bash-3.2$ mono BigSerializationTest.exe 270206000
Serialization time = 3.428312 secs.
bash-3.2$ mono BigSerializationTest.exe 270210000
Serialization time = 4.644107 secs.
bash-3.2$ mono BigSerializationTest.exe 270250000
Serialization time = 21.2402 secs.
bash-3.2$ mono BigSerializationTest.exe 270300000
Serialization time = 40.710206 secs.
bash-3.2$ mono BigSerializationTest.exe 270500000
Serialization time = 119.514284 secs.
bash-3.2$ mono BigSerializationTest.exe 271000000
Serialization time = 316.298852 secs.

Code for testing:

using System;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;

public class BigSerializationTest {

 public static void Main ( String[] args ) {

  int size = Convert.ToInt32 ( args [ 0 ] );

  BinaryFormatter bf = new BinaryFormatter();
  MemoryStream    ms = new MemoryStream();

  float[] array = new float [ size ];

  for ( int i = 0; i < array.Length; i++)
   array [ i ] = 1.0f;

  DateTime dt1 = DateTime.Now;
  bf.Serialize ( ms, array );
  DateTime dt2 = DateTime.Now;

  Console.WriteLine ( "Serialization time = " + (dt2-dt1).TotalSeconds + "
secs." );

 }


}

Is there some possibility to resolve this problem in the nearest future?
This problem is a very critical for us ...

Thanks.

Yury

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list