Always something with memory management…

I've been working on this Photo Album Web Service for some time now. I started it about a year ago, and then I stopped working on it last May when I went to intern at Microsoft on the Windows team. So, I decided that I'd finally pick it up again and start updating it.

First order of business was upgrading the DIME support that I had in the Web Service and the Administration application that I have for the Web Service. DIME is this great proposed standard that essentially is MIME for SOAP messages. Back a year ago the support for it was really poor, so when I saw that Microsoft released its Web Services Enhancements SDK 1.0 a few months ago, I knew immediately that this would be on the top of my list to update in the Photo Album Web Service. Anyway, I just moved over to using ws-Attachments (DIME) with the WSE. It's quite phenomenal how far this has come from the inital implementation from 01/2002.

The next order of business was to finally do that memory optimization that I've been meaning to do for some time. Well, simply put, this Photo Album Web Service isn't a light Web Service to be running. It takes the original file (say a 3.1 magapixel JPG from my digital camera) and dynamically does resizing for thumbnails, etc. I really hated having to make thumbnails on my own, so, this does it for me automatically now. Anyway, with a JPG of about 1 Mb in size, this gets very memory intensive. So, needless to say, I went around fixing code I had initally left without memory optimization. I've known for some time that it's generally good practice to call .Dispose() on any objects that have the IDisposable interface implemented, so, I just went around calling .Dispose() where appropriate and
the results show it... about a 5500% memory perf increase! Woohoo!! (Yes, that's
alot... this is in one test that I did with a category with many photos... in
any case, this may not be the case for all categories with less or more photos in them, but this is a good sign anyway. :))

Comments (3)

  1. Tim Marman says:


    Is this something you plan on sharing?? I’d love to check it out. I’ve been meaning to build some sort of photo album functionality for awhile now, to share and sort all the digicam pictures I take!

  2. Yep. It’ll be available soon, within a week or two at most (as it currently looks). I had it up on my server at home, but my ISP keeps blocking HTTP ports that I kept opening, so, I took it down just to my intranet at home. I’ll write more about this in the next blog.

  3. I have a little ASP.NET photo album app, I wrote it a while ago when I was first looking into .NET so I would be keen to see what you have come up with. One thing, you say it’s a Web Service, have you developed a front end to consume this service? Maybe I should just wait for your next blog…

Skip to main content