Jul 2, 2012 at 12:49 PM
Edited Jul 2, 2012 at 12:51 PM
|
with this simple console application test
string response = string.Empty;
Flickr flickr = new Flickr("84753984759348759348759");
PhotoSearchOptions searchOptions = new PhotoSearchOptions();
PhotoCollection photos = new PhotoCollection();
while (response != ".")
{
Console.Write("Search: ");
string search_term = Console.ReadLine();
Console.Write("perpage: ");
string perpage = Console.ReadLine();
searchOptions.Tags = search_term.Trim();
searchOptions.PerPage = Convert.ToInt32(perpage);
searchOptions.SortOrder = PhotoSearchSortOrder.Relevance;
Console.WriteLine("starting to search for '" + search_term + "' ...");
photos = flickr.PhotosSearch(searchOptions);
Console.WriteLine("found: " + photos.Count);
Console.WriteLine("press '.' to quit");
response = Console.ReadLine();
}
Console.WriteLine("test done");
running the test gives the application an initial memory working set of 3120kb or sometimes 5k+ kb
will search "cats" and 10 per page gives app test a staggering 88k+ KB
on the same loop.. I looked for "dogs" and
20 per page, raise to 90k+ KB
then I looked for "nature" and 200 per page, stays at 90k+ or sometimes 92k+ KB
can the memory consumption be optimized?
check the preview here
http://i1087.photobucket.com/albums/j478/jaysonragasa/flickr.jpg
|