This content has been marked as final. Show 2 replies
I began doing this with a StringBuffer but I am thinking this is going to kill memoryUnless you've profiled and know that you have memory problems, don't spend a lot of your time worrying about them.
Any thoughs on how I should habndle this?Do the simplest thing that could possibly work. Then analyze and change if necessary.
You don't say how large your strings are. Are we talking 10kb or 10mb? If the latter, you're going to have issues with whatever you do, including downloading all that text from server. If the former, it's not going to make a big different whatever you do, so don't sweat it. Since you're talking varchars, which I believe have a 64k limit under ANSI-92, it sounds like the former.
If you run into problems with simple StringBuffer manipulation, you can think of some sort of piped approach: design your spell-checker to take a Reader as input, and a Writer as output.