Writing a dictionary app is hard :)

So I really would like a PPC version like a lot of other people. I have a new pocket PC, VS.Net, and I am a programmer. So I thought I would try to write a "quick" PPC version of a C-E dictionary using the CEDICT database until I can buy the Pleco one. My first attempt produced a painfully slow search :( The version I have has about 23,000 entries. How do you guys make a dictionary load and search so fast? OK, so my first attempt was probably a stupid idea: I converted CEDICT in to an XML file that is about 2.5 MB and then in the program I load the XML file in to a DataSet which loads the entire DB in to memory. I would expect that to be slow loading the Dictionary, but you would think it would be much faster searching since it is in memory. Anyway, does anybody have any more ideas about different ways to load/search the data? I was considering SQL CE. Could that be faster?
 

mikelove

皇帝
Staff member
Indexing, mostly - PlecoDict uses an extremely powerful multi-level index to keep pinyin and character searches fast even on a slow Palm with a 200,000-entry database. (the dictionary still runs slowly on OS4 devices because we haven't optimized the font drawing code yet - searches in PlecoDict in general are actually much faster than in Oxford E&C)

In your case, since this is only for short-term use you might be better off using an off-the-shelf database program like TomeRaider (http://www.tomeraider.com) - the newest version supports Unicode, so you should have no trouble getting CEDICT to display/search correctly in it. One of the earliest Palm prototypes of Oxford E&C was hacked together with TomeRaider, actually.
 
Top