13th June 2009, 6:12 AM
So, I created a photo gallery web application in ASP.Net. Basically the app reads jpg's in a predefined folder on the server, and automatically renders thumbnails for each picture as well as full view images on the photo gallery page.
My problem was that the page took 30 seconds or more to load because it had to rerender every image thumbnail and fullview image everytime someone loaded the page.
But I happend to stumple on a article on the internet, and threw the gloery of .Net I implimented data caching with only 3 lines of code!
So now the page only has to render the image gallery once, it stores all image thumbnails and fullview images in memory and all the requests are streamed from memory after the first time. Now my page loads in under 1 second! There's even support that if someone chages a image file on the server, the data cache for that image is automically expired.
All this in only 3 lines of code!
Is there any thing .Net cant do???
There's probably a built in library for ordering me breakfast in the morning.
assembly: system.net.getfood![[Image: biggrin.gif]](http://www.tcforums.com/ubb/biggrin.gif)
You really have to admire all the thought that was put into the included code you get with .Net, it's like the bible. Every contingency thought of, absolutly flawless.
You can check out my app: here
My problem was that the page took 30 seconds or more to load because it had to rerender every image thumbnail and fullview image everytime someone loaded the page.
But I happend to stumple on a article on the internet, and threw the gloery of .Net I implimented data caching with only 3 lines of code!
So now the page only has to render the image gallery once, it stores all image thumbnails and fullview images in memory and all the requests are streamed from memory after the first time. Now my page loads in under 1 second! There's even support that if someone chages a image file on the server, the data cache for that image is automically expired.
All this in only 3 lines of code!
Is there any thing .Net cant do???
There's probably a built in library for ordering me breakfast in the morning.
assembly: system.net.getfood
![[Image: biggrin.gif]](http://www.tcforums.com/ubb/biggrin.gif)
You really have to admire all the thought that was put into the included code you get with .Net, it's like the bible. Every contingency thought of, absolutly flawless.
You can check out my app: here