Click here to Skip to main content
15,891,864 members
Home / Discussions / C#
   

C#

 
GeneralRe: Weird form update problem... Pin
Drew Stainton11-Nov-05 19:15
Drew Stainton11-Nov-05 19:15 
QuestionNeed some help with regex Pin
FreeClimber11-Nov-05 9:53
FreeClimber11-Nov-05 9:53 
AnswerRe: Need some help with regex Pin
leppie11-Nov-05 10:51
leppie11-Nov-05 10:51 
GeneralRe: Need some help with regex Pin
FreeClimber11-Nov-05 11:25
FreeClimber11-Nov-05 11:25 
QuestionCreating a new table of smaller dataset. Pin
zaboboa11-Nov-05 9:29
zaboboa11-Nov-05 9:29 
AnswerRe: Creating a new table of smaller dataset. Pin
rudy.net11-Nov-05 11:04
rudy.net11-Nov-05 11:04 
QuestionHow to rename mapped drive? Pin
Shumsky11-Nov-05 8:51
Shumsky11-Nov-05 8:51 
QuestionBinary Formatter problems Pin
Marc Clifton11-Nov-05 8:37
mvaMarc Clifton11-Nov-05 8:37 
Am I not using the binary formatter correctly?

I've been doing some tests, with this code:

BinaryFormatter bf=new BinaryFormatter();
FileStream fs=new FileStream("foo.bin", FileMode.Create);
bf.Serialize(fs, dt);
fs.Close();


where "dt" is a DataTable. For stress testing, I have table with some 150,000 records. It takes about 80MB when the table is loaded.

When I run the above code, the memory utilization goes through the roof (in fact, it ultimately crashes with out of memory exception).

1) why is running out memory?
2) what is this thing doing internally? If I'm serializing to a stream, it seems like it should behave like a stream--chunks of data, not all this in-memory processing.
3) why is the resulting file so darn big? BinaryFormatter seems to be a major misconception, except that the data itself is serialized in binary. However, all the tags and header stuff etc is all plain text!

Has anyone written a replacement for what appears to be a real POS?

Marc


VS2005 Tips & Tricks -- contributions welcome!
AnswerRe: Binary Formatter problems Pin
leppie11-Nov-05 10:47
leppie11-Nov-05 10:47 
AnswerRe: Binary Formatter problems Pin
Joe Woodbury11-Nov-05 20:30
professionalJoe Woodbury11-Nov-05 20:30 
QuestionWhy is there a ContextMenu Property on TreeView? Pin
SeanCM11-Nov-05 8:35
SeanCM11-Nov-05 8:35 
AnswerRe: Why is there a ContextMenu Property on TreeView? Pin
SeanCM11-Nov-05 8:46
SeanCM11-Nov-05 8:46 
AnswerRe: Why is there a ContextMenu Property on TreeView? Pin
Colin Angus Mackay11-Nov-05 23:38
Colin Angus Mackay11-Nov-05 23:38 
GeneralRe: Why is there a ContextMenu Property on TreeView? Pin
SeanCM14-Nov-05 6:33
SeanCM14-Nov-05 6:33 
Questionsidebar Pin
faviochilo11-Nov-05 8:26
faviochilo11-Nov-05 8:26 
AnswerRe: sidebar Pin
leppie11-Nov-05 10:55
leppie11-Nov-05 10:55 
QuestionCreating a popup from Pin
naglbitur11-Nov-05 7:28
naglbitur11-Nov-05 7:28 
AnswerRe: Creating a popup from Pin
Wjousts11-Nov-05 7:55
Wjousts11-Nov-05 7:55 
GeneralRe: Creating a popup from Pin
naglbitur11-Nov-05 9:36
naglbitur11-Nov-05 9:36 
GeneralRe: Creating a popup from Pin
Wjousts11-Nov-05 10:59
Wjousts11-Nov-05 10:59 
Questionsend webcam stream over tcp ip Pin
toan198111-Nov-05 7:15
toan198111-Nov-05 7:15 
QuestionEventInfo.GetRaiseMethod() - anyone made it work? Pin
vSoares11-Nov-05 6:37
professionalvSoares11-Nov-05 6:37 
AnswerRe: EventInfo.GetRaiseMethod() - anyone made it work? Pin
leppie11-Nov-05 7:07
leppie11-Nov-05 7:07 
QuestionCreating Quick Launch like Applications Pin
jgallen2311-Nov-05 5:54
jgallen2311-Nov-05 5:54 
AnswerRe: Creating Quick Launch like Applications Pin
Dwayner7911-Nov-05 8:22
Dwayner7911-Nov-05 8:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.