Compare Instr() and IndexOf() performance
- From: elena <elena@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 8 Dec 2008 07:38:01 -0800
Hi, All
I have I CF 2.0 targeting WCE 5.0 application.
I need to perform search on a 3 files on the click event.
It takes about up to 15 seconds to search files if i use str1.IndexOf( str2)
and then
str1.Substring(). Searched files are not that large at all file1 - 780 kb,
file2 - 340 kb, file3 - 125 kb, the search performed with
streamreader.ReadToEnd().
10 - 15 seconds become long wait for the users. How can i improve/speed up
the search? I am testing the same search routine with pos = Instr(str1, str2)
and then Mid(str1, pos, 10), and it works a little bit faster.
Please, any ideas how to speed up search.
thank you,
.
- Follow-Ups:
- Re: Compare Instr() and IndexOf() performance
- From: Christopher Fairbairn [MVP]
- Re: Compare Instr() and IndexOf() performance
- Prev by Date: Re: Load Forms in background on startup
- Next by Date: Pb Exception :HRESULT: 0x80131040 .
- Previous by thread: EXE error
- Next by thread: Re: Compare Instr() and IndexOf() performance
- Index(es):