ImageSourceConverter.ConvertFromString slows down in long running application

Go To StackoverFlow.com

0

I have an application that essentially shows a slide show of images from a file. The loading of the images slows down over time. Putting in some timing code, I've identified the slowing line of code as the ConvertFromString line below:

var imgSrcConverter = new ImageSourceConverter();
imgSrc = (ImageSource) imgSrcConverter.ConvertFromString(imgFilePath);

Over the course if 15 hours, the execution of this line went from taking ~70ms to >400ms.

Can anyone offer any suggestions as to why this would happen and what can be done to prevent and/or improve the situation?

2012-04-05 15:51
by Chasler
Are you holding the imgSrc in memory perpetually? Check for memory leaks - Bahri Gungor 2012-04-05 16:08
Is this in a loop. Can you get reference and just hold it. If not make sure the old ImageSourceConverter is getting disposed properly - paparazzo 2012-04-05 16:28


0

Could you load the images into memory on startup, and then just cycle through them?

2012-04-05 17:17
by KRichardson
Ads