It's probably worth removing the iterating code Just In Case.
Apologies for egg-suck-education, but I assume you're not doing something silly like
for (i=0; i < strlen(bigtextstring); i++) {
....
}
I know it sounds stupid, but you'd be amazed how many times that crops up, and for small strings it doesn't matter, but for large strings it's catastrophic.
Geoff