commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Ritter <>
Subject Re: [csv] Improving readability in CSVLexer
Date Wed, 21 Mar 2012 19:16:44 GMT

I've tried to remove the Token input parameter in CSVLexer.nextToken().
First by creating ne new Token on every invocation of nextToken().
That slowed execution of that method by about 100ms. So I added a
private Token field to CSVLexer, that only get's initiated once. But
that solution was also slower than the one we have now.

I'm not sure what to do now. Any suggestions? Shall I create a patch
for you to review?


Am 16. März 2012 17:06 schrieb Emmanuel Bourg <>:
> Le 16/03/2012 17:01, Emmanuel Bourg a écrit :
>>> 2. add additional convenience methods
>>> Right now we have some methods for char handling like isEndOfFile(c).
>>> There are some methods missing like isDelimiter(c) or
>>> isEncapsulator(c). There is not much to say about this. I just think
>>> that isDelimiter(c) is slightly easier to understand than c ==
>>> format.getDelimiter().
> Sorry I misread your phrase. Actually removing these methods resulted in a
> slower parsing. So yes give it a try.
> Emmanuel Bourg
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message