process a BIG string



Hy,
i need to process every character in a file, so i open the file read
in buffers of about 8192bytes and process each buffer, then i write
the output to another file.

the problem is that with large files(>8Mb) i get a script error(Fatal
error: Maximum execution time of 30 seconds exceeded ).
i acess every character in the buffer with
$chr=ord($bufferIn{$i}); (where $i=0...8192)
seems like all he time the script consumes is in the for loop and the
chr/ord functions.

can i do something to speed things up?
is there any other way of acessing a single characher except
$bufferIn{$i} ?

.



Relevant Pages

  • renee.rtf.xaa
    ... renee is RTF parser/macro processor I wrote. ... Character Stream\ ... Write Output Buffer to Files\ ...
    (comp.lang.tcl)
  • Re: input & output in assembly
    ... [As you've not specified OS or assembler, ... using individual character I/O and handling the rest yourself in your ... it finds in that string, ... ENTER key is pressed (maximum buffer size: ...
    (comp.lang.asm.x86)
  • Re: input & output in assembly
    ... [As you've not specified OS or assembler, ... using individual character I/O and handling the rest yourself in your ... it finds in that string, ... ENTER key is pressed (maximum buffer size: ...
    (alt.lang.asm)
  • Re: Can C do it ?
    ... where the user enters data with getchar() handling it like in the code ... and so on for each character entered until is pressed down. ... The Linux terminal driver does line canonicalization (in the normal ... For the next one the stdio buffer is now empty, ...
    (comp.lang.c)
  • Stateful character decoder?
    ... a decoder that will cache incomplete characters so that the caller can simply discard its entire input after calling the decoder. ... If you want to treat your input as a character stream, you've got a couple of very convenient options: InputStreamReader and BufferedReader. ... The problem with the latter is that using a CharsetDecoder explicitly means that if you get a partial character at the end of the current input buffer, you have to preserve those bytes and resubmit them to the decoder on the next try. ...
    (comp.lang.java.programmer)