By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,448 Members | 1,385 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,448 IT Pros & Developers. It's quick & easy.

Any size limitation on the BinaryFormatter serialization

P: n/a
Hi everybody,

In my application, I'm planning to use BinaryFormatter to serialize a
potentially huge object to file (and, of course, deserialize back to
memory later). My question is if there is any hard limit on the size
of this object?

Is it only limited by the amount of memory or hard-disk space in the
server?

If there is no limit, how scalable is this serialization process?

Thanks in advance for any input to this subject
Dominic
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
BinaryFormatter can take a memory stream or any type of stream. So you can
serialize
directly to disk. When you deserialize, you'll need enough memory to recreate
the object
tree that you originally serialized. Currently there isn't really any way to
figure out how much
memory your object is going to take without using the ICorProfiler interfaces.

BinaryFormatter is extremely fast. It is used for remoting and many other time
critical applications
so it will continuously be improved on for performance. However, it isn't
extremely robust. A single
touch to the file on disk can cause it to be unreadable. You can see more about
this tamper issue on
my blog: http://weblogs.asp.net/justin_rogers.../02/66508.aspx
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers
"Dominic" <do****@hotmail.com> wrote in message
news:2b**************************@posting.google.c om...
Hi everybody,

In my application, I'm planning to use BinaryFormatter to serialize a
potentially huge object to file (and, of course, deserialize back to
memory later). My question is if there is any hard limit on the size
of this object?

Is it only limited by the amount of memory or hard-disk space in the
server?

If there is no limit, how scalable is this serialization process?

Thanks in advance for any input to this subject
Dominic

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.