Forum Moderators: open
I have been searching for a solution for this problem for hours now and unfortunately I havent found anything which could help me...
What I want is:
I have got an .asp Page which has a high amount of data which is taken from a sql database. It takes about 30 to 40 seconds to display the results and thats way too long... What I want to do know is saving the html code which is generated for the clients on the server as a static html file...The fact that the html site will be static is no problem because the related asp site gets very very few updates...
Is there any possible way to realize this? I know I could write every line in a html file but isn't there a possible solutio for saving ALL the code AT ONCE?
thanks
Hm if I would do it the way you propose, I would have to change the string in the application object manually everytime I made some changes/updates to the asp file right?
I'd like to realiz it the way that the static html code is always loaded especially anyone who has admin-rights changed something in the database. In this case the .asp script should run again and the new string should be saved as static html until the next changes. etc
You could save the HTML as a string in the Application object.
If this is alot of data, the Application Object was not intended to be used as a repository for a 'large amount of data'. How much data are we talking about?
If there is alot of data (MB's?) What's taking the most time?
1) Reading the Data from DB
2) Rendering the HTML
3) Downloading the text (how much content? MB's?)
The reason I ask is if your SQL read is taking more than a few seconds, then there's a design issue in the Database, perhaps simply an Index needs to be added to a table. SQL can return thousands of results from multi-million record tables very quickly if they are designed and indexed properly.
If the rendering the HTML is taking too much time then Caching ASP Content [msdn.microsoft.com] will do what you need.
If you are downloading 2MB worth of text then your 30-40 second rendering is slow due to the amount of data you are pushing to the client.
Have you done a diff on the Ticks at the beginning of the page and then at the end (ie: how long process/rendering takes).