473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

String Builder - out of Memory Exception

P K
Hi,

I have around 30 fields on a screen each one of which I need to validate.
The idea was to have a set of messages to be displayed for all the posiible
errors instead of having to show a single message at a time.
For this I was using a string builder and appending all the text to it after
each validation. This process slowed down the system and at a point I got the
out of memory exception. Would a string builder consitsiting of 20-30 lines
leave the system out of memory? What is the best way to tackle this oter than
having to send one error message back to the client each time?

P K
Nov 19 '05 #1
2 2333
Have you tried to check what you construct as you go ?

My first move would be that there is some kind of error that makes a far
more bigger string than what you expect (would explain both slowness and out
of memory error).
--
Patrice

"P K" <PK@discussions.microsoft.com> a écrit dans le message de
news:F0**********************************@microsof t.com...
Hi,

I have around 30 fields on a screen each one of which I need to validate.
The idea was to have a set of messages to be displayed for all the posiible errors instead of having to show a single message at a time.
For this I was using a string builder and appending all the text to it after each validation. This process slowed down the system and at a point I got the out of memory exception. Would a string builder consitsiting of 20-30 lines leave the system out of memory? What is the best way to tackle this oter than having to send one error message back to the client each time?

P K

Nov 19 '05 #2
Hi P.K.,

The error you described indicates an infinite loop somewhere in your code.
Try to step through the page using the debugger.
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"P K" wrote:
Hi,

I have around 30 fields on a screen each one of which I need to validate.
The idea was to have a set of messages to be displayed for all the posiible
errors instead of having to show a single message at a time.
For this I was using a string builder and appending all the text to it after
each validation. This process slowed down the system and at a point I got the
out of memory exception. Would a string builder consitsiting of 20-30 lines
leave the system out of memory? What is the best way to tackle this oter than
having to send one error message back to the client each time?

P K

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Stephan | last post by:
why does the following code not work???? after compiling and running it will just say killed after all my memory filled up any suggestions? #include <iostream> using namespace std; void...
1
by: Yuriy | last post by:
Hi, Can anybody explain the following? Say I have the following source XML and XSLT (see below). No matter what this XSLT does. It is just a sample to show a problem. the idea is that XSLT...
2
by: Aravind | last post by:
Hi, I am ruuning to out of memory exception , My system has RAM of 4 GB and virtual memory paging size set to 4GB .When I check the memory occupied by the process during the exception , it is less...
3
by: anastasia | last post by:
I get an out of memory exception when attempting to excecute the following code: original = System.Drawing.Image.FromFile(file.FileName,true); I ONLY get this exception when the file is in the...
12
by: Tee | last post by:
String Builder & String, what's the difference. and when to use which ? Thanks.
3
by: rsine | last post by:
I have searched around a little and have yet to find a naming convention for the string builder object. I really do not want to use "str" since this is for string objects and thus could be...
8
by: simonZ | last post by:
I have Function with string parameteres: public string newLine(String string1,String string2,String string3){ StringBuilder webLine = new StringBuilder(); webLine.Append("<tD nowrap>" +...
3
by: simonZ | last post by:
I read some articles about stringBuilder vs string. I'm using the loop, so I must use string builder. My example: String s1; String s2; String s3; StringBuilder webLines=new...
6
by: mcfly1204 | last post by:
I have a method where I am building an html email. Part of the way through the method, I have an if-statement that direct to another method based off of a field. For example: ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.