[fedora-java] OT: java question: CharSequence from file

Christoph Höger choeger at cs.tu-berlin.de
Mon May 4 21:12:39 UTC 2009


Hi guys,

I need to lex a textfile as fast as possible(TM) by using a set of regex
patterns.

Pattern expects a CharSequence as input. I used to read the input file
into a StringBuffer completely and than start lexing (cutting of the
part that matches in every step). 

This is not very effective from both the memory and runtime perspective.
(ok, not so much runtime, since you _have_ to read every char anyway).

Today I just searched for some kind of delayed Buffer that would take
the input from the reader on demand or even do it in a parallel thread.

Is there any such thing out there yet?

thanks

christoph
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-devel-java-list/attachments/20090504/fb884d44/attachment.sig>


More information about the fedora-devel-java-list mailing list