Algorithms are just general guides,or set of steps for solving a particular problem.It is difficult to convert in code by software.
If any software convert algo to code then it requires some own syntax to define algorith then it will converts intio code.
Well the chart control just makes a JPG or PNG image, that you reference in HTML in which your server sends back to the users web browser for display.
A well written chart program can generate an image in like 1/10th of a second. So your slow times must be from not closing a Paint handle, SQL handle or something like that, and your waiting for something to timeout. Or you forgot to destroy an object somewhere.
The chart control is just a wrapper to the paint or GDI classes in asp.net, I'm not aware of any feedback handle in the chart control.
Step through your program using debug, and set some breakpoints.
I've just tested, and when populating a small amount of data it runs fast, however when populating more data the process slows down. The SQL query runs fine, my x/y plotting runs fine. But after my methods are finished it slows down. It must be something with generating the picture....
FYI: I'm generating a chart based on a timeline with appr. 10000 rows with the X/Y values in two separate columns on each row.
or the final write to create the image file to the disk drive
Did you make a thousand variables, that the garbage collector has to clean-up at the end of your function? garbage collection takes lots of time to complete. Since your writing in an high level language wrapper, you don't see the extra tasks and time needed to cleanup memory at the end.
How big is the final image file size?, over 5 megs?
Are you writing a huge PNG at 24 or 32 bits, instead of a compressed JPG?
A nice chart is something that is 640 x 480, easy to read, no scrolling.
Or you can change the program to create each record 1 by 1, and loop it to create 10K charts, just kidding, but serious about breaking it down into smaller pieces.
You might of run out of memory RAM and threads, and the computer is doing a huge disk swap to complete the job. You may need to do some serious optimization on your code there.
It exits my method (that fetches data from the SQL server and binds them to the chart) in milliseconds. Then, after that, I'm unable to find out why it takes so long... Do you have any tricks to detect where the time goes??
The final size when saving it to my desktop is just 30kb.
I am indeed a beginner in ASP.NET and C# so please have that in mind, and thank you very much for taking the time to answer my questions....
I didn't know you were binding, that's different. I thought you were using pure code to build your chart. I'm not sure if you have downloaded the sample project that shows how to make various charts. In the sample project, they are combinations of code behind and <asp::chart> objects, and use small xml files for data to feed the points, so that's why they run so fast. The sample projects are a good way to learn how to build a faster chart object.
I haven't used a bound object in over 7 years, so I'm not qualified for assisting you. There good for small websites, but not practical for hi volume use because of the amount of resources needed, and speed. There's nothing you can do about the speed right now, until you expand you skill set to write part of it in code.
You should try here and ask for help, the chart control is a beast, and took me a couple of weeks to understand how to write one in pure code.
Objects like the Chart and Gridview can actually be their own forum, because the skys the limit on those topics. But go ahead and ask the same question again, and see what the bound chart object guru's say about it.
Hope someone can help with a question, Im not an asp.net developer so please bare with me.
I created a very simple Singleton class, that is, its not thread safe. Now I would have though that the singleton class instance would only exist for a single page request.
What I am finding is that my test singleton instance persists over several http requests.
I wanted to develop a very small cms with a single db instance that exists only for each page request. So really my question is how does IIS keep the singleton instance alive for several page requests.
i want to insert mathematical and chemical formula in SQL server database 2005 using xls file and want to retrive it on webpage using asp.netwith c#.iam able to insert other data into database but in place of chemical and mathematical formula its showing null and i am unable to retrive it also so please help me how to short out this problem