Page 1 of 1

Search speed

Posted: Mon Mar 08, 2010 4:03 pm
by dhobbs
Thanks to the help I've received here, I have created a simple application for viewing images. I now would like to annotate the images so users can search on keywords and get the appropriate image. I'm thinking of two approaches. One, I can use stacks and cards. For each topic, the number of images is probably less than 25, so maybe I can just load the whole stack. I'm also considering reading from a formatted text file which contains all the annotations.

The question is: How do I do a search to return all the image files associated with a keyword? Is it easier to do this if they are all cards in a stack, or can I use a text file (with formatting, using "read file until" ) and repeat until all the files are retrieved? One uses larger files, and the other is frequently accessing the hard drive. Is one better?

Thanks,

--Doug

Re: Search speed

Posted: Tue Mar 09, 2010 10:09 am
by Mark
Hi Doug,

I would keep a list (in memory, a text file, a property or a database) and search for the tag. Update the list each time when a tag is added. Make sure you keep the list in a writable location (not in the applications folder).

Best,

Mark

Re: Search speed

Posted: Thu Mar 11, 2010 3:28 pm
by dunbarx
If the number of cards is less than a handful of thousands, I think the most intuitive way is to keep it all in a stack. Each card can hold the images and a bg field with keywords. Speed will be instantaneous.

Craig Newman

Re: Search speed

Posted: Thu Mar 11, 2010 3:48 pm
by Mark
Craig

Why not do it right, right from the beginning? Whenever the database gets much bigger than originally intended, Doug might get into trouble, if keeping everything in cards.

Best,

Mark