You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Benedikt Ritter (Created) (JIRA)" <ji...@apache.org> on 2012/03/16 18:05:38 UTC
[jira] [Created] (CSV-71) Add convenience Methods to CSVLexer
Add convenience Methods to CSVLexer
-----------------------------------
Key: CSV-71
URL: https://issues.apache.org/jira/browse/CSV-71
Project: Commons CSV
Issue Type: Sub-task
Components: Parser
Affects Versions: 1.0
Reporter: Benedikt Ritter
Fix For: 1.0
Attachments: CSV-71.patch
Add {{isDelimiter(c)}} and {{isEncapsulator(c)}} to CSVLexer
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CSV-71) Add convenience Methods to CSVLexer
Posted by "Sebb (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CSV-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb resolved CSV-71.
---------------------
Resolution: Fixed
Fixed. In my testing, the new CSVLexer is about 4% faster than the old one (kept temporarily as CSVServer1 in the test tree).
To test:
{code}
set classpath=target/classes;target/test-classes
java -server org.apache.commons.csv.PerformanceTest 10 CSVServer CSVServer1
{code}
> Add convenience Methods to CSVLexer
> -----------------------------------
>
> Key: CSV-71
> URL: https://issues.apache.org/jira/browse/CSV-71
> Project: Commons CSV
> Issue Type: Sub-task
> Components: Parser
> Affects Versions: 1.0
> Reporter: Benedikt Ritter
> Fix For: 1.0
>
> Attachments: CSV-71.patch, Emmanuels_Performance_Test.patch
>
>
> Add {{isDelimiter(c)}} and {{isEncapsulator(c)}} to CSVLexer
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CSV-71) Add convenience Methods to CSVLexer
Posted by "Benedikt Ritter (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CSV-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231415#comment-13231415 ]
Benedikt Ritter commented on CSV-71:
------------------------------------
On the performance tests takes around 5 secs. I get the following results:
|| ||min||max||avg||
| before | 5103 | 5260 | 5170 |
| after | 5091 | 5238 | 5142 |
At least on my machine there is no negative impact. I ran the test with VM param -server. I'm using {{Java version: 1.7.0_01, vendor: Oracle Corporation}}
> Add convenience Methods to CSVLexer
> -----------------------------------
>
> Key: CSV-71
> URL: https://issues.apache.org/jira/browse/CSV-71
> Project: Commons CSV
> Issue Type: Sub-task
> Components: Parser
> Affects Versions: 1.0
> Reporter: Benedikt Ritter
> Fix For: 1.0
>
> Attachments: CSV-71.patch
>
>
> Add {{isDelimiter(c)}} and {{isEncapsulator(c)}} to CSVLexer
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CSV-71) Add convenience Methods to
CSVLexer
Posted by "Benedikt Ritter (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CSV-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231415#comment-13231415 ]
Benedikt Ritter edited comment on CSV-71 at 3/16/12 5:36 PM:
-------------------------------------------------------------
On my machine the performance tests takes around 5 secs. I get the following results:
|| ||min||max||avg||
| before | 5103 | 5260 | 5170 |
| after | 5091 | 5238 | 5142 |
At least on my machine there is no negative impact. I ran the test with VM param -server. I'm using {{Java version: 1.7.0_01, vendor: Oracle Corporation}}
was (Author: britter):
On the performance tests takes around 5 secs. I get the following results:
|| ||min||max||avg||
| before | 5103 | 5260 | 5170 |
| after | 5091 | 5238 | 5142 |
At least on my machine there is no negative impact. I ran the test with VM param -server. I'm using {{Java version: 1.7.0_01, vendor: Oracle Corporation}}
> Add convenience Methods to CSVLexer
> -----------------------------------
>
> Key: CSV-71
> URL: https://issues.apache.org/jira/browse/CSV-71
> Project: Commons CSV
> Issue Type: Sub-task
> Components: Parser
> Affects Versions: 1.0
> Reporter: Benedikt Ritter
> Fix For: 1.0
>
> Attachments: CSV-71.patch
>
>
> Add {{isDelimiter(c)}} and {{isEncapsulator(c)}} to CSVLexer
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CSV-71) Add convenience Methods to CSVLexer
Posted by "Benedikt Ritter (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CSV-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benedikt Ritter updated CSV-71:
-------------------------------
Attachment: CSV-71.patch
I've added a patch for this issue.
> Add convenience Methods to CSVLexer
> -----------------------------------
>
> Key: CSV-71
> URL: https://issues.apache.org/jira/browse/CSV-71
> Project: Commons CSV
> Issue Type: Sub-task
> Components: Parser
> Affects Versions: 1.0
> Reporter: Benedikt Ritter
> Fix For: 1.0
>
> Attachments: CSV-71.patch
>
>
> Add {{isDelimiter(c)}} and {{isEncapsulator(c)}} to CSVLexer
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CSV-71) Add convenience Methods to CSVLexer
Posted by "Benedikt Ritter (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CSV-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234865#comment-13234865 ]
Benedikt Ritter commented on CSV-71:
------------------------------------
Feel free to add that, if you want to apply the patch. Or do you want me to modify the patch and re-submit it?
> Add convenience Methods to CSVLexer
> -----------------------------------
>
> Key: CSV-71
> URL: https://issues.apache.org/jira/browse/CSV-71
> Project: Commons CSV
> Issue Type: Sub-task
> Components: Parser
> Affects Versions: 1.0
> Reporter: Benedikt Ritter
> Fix For: 1.0
>
> Attachments: CSV-71.patch, Emmanuels_Performance_Test.patch
>
>
> Add {{isDelimiter(c)}} and {{isEncapsulator(c)}} to CSVLexer
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CSV-71) Add convenience Methods to CSVLexer
Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CSV-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234856#comment-13234856 ]
Sebb commented on CSV-71:
-------------------------
Just tried on my system, and I see similar performance both with and without the patch.
Likewise if the patch is extended to check whether the character is enabled or not, and using class fields, for example:
private boolean isEscape(int c) {
return escaping && c == escape;
}
> Add convenience Methods to CSVLexer
> -----------------------------------
>
> Key: CSV-71
> URL: https://issues.apache.org/jira/browse/CSV-71
> Project: Commons CSV
> Issue Type: Sub-task
> Components: Parser
> Affects Versions: 1.0
> Reporter: Benedikt Ritter
> Fix For: 1.0
>
> Attachments: CSV-71.patch, Emmanuels_Performance_Test.patch
>
>
> Add {{isDelimiter(c)}} and {{isEncapsulator(c)}} to CSVLexer
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CSV-71) Add convenience Methods to CSVLexer
Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CSV-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231474#comment-13231474 ]
Sebb commented on CSV-71:
-------------------------
I meant that *all* the tests take about 3 times longer (including the current code).
I've not tried the patch yet so I don't know if it is faster or slower or about the same on my system.
> Add convenience Methods to CSVLexer
> -----------------------------------
>
> Key: CSV-71
> URL: https://issues.apache.org/jira/browse/CSV-71
> Project: Commons CSV
> Issue Type: Sub-task
> Components: Parser
> Affects Versions: 1.0
> Reporter: Benedikt Ritter
> Fix For: 1.0
>
> Attachments: CSV-71.patch, Emmanuels_Performance_Test.patch
>
>
> Add {{isDelimiter(c)}} and {{isEncapsulator(c)}} to CSVLexer
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CSV-71) Add convenience Methods to CSVLexer
Posted by "Benedikt Ritter (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CSV-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231569#comment-13231569 ]
Benedikt Ritter commented on CSV-71:
------------------------------------
Ah okay, I got that wrong.
Then I guess it has something to do with your system. The tests take about the same time, they took a few days ago, on my machine.
> Add convenience Methods to CSVLexer
> -----------------------------------
>
> Key: CSV-71
> URL: https://issues.apache.org/jira/browse/CSV-71
> Project: Commons CSV
> Issue Type: Sub-task
> Components: Parser
> Affects Versions: 1.0
> Reporter: Benedikt Ritter
> Fix For: 1.0
>
> Attachments: CSV-71.patch, Emmanuels_Performance_Test.patch
>
>
> Add {{isDelimiter(c)}} and {{isEncapsulator(c)}} to CSVLexer
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CSV-71) Add convenience Methods to CSVLexer
Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CSV-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231452#comment-13231452 ]
Sebb commented on CSV-71:
-------------------------
What performance test is that? On my system the tests take about 3 times as long!
But that is using Java 1.6 on an old XP laptop.
Can you attach the code; it would help to ensure we use the same tests.
> Add convenience Methods to CSVLexer
> -----------------------------------
>
> Key: CSV-71
> URL: https://issues.apache.org/jira/browse/CSV-71
> Project: Commons CSV
> Issue Type: Sub-task
> Components: Parser
> Affects Versions: 1.0
> Reporter: Benedikt Ritter
> Fix For: 1.0
>
> Attachments: CSV-71.patch
>
>
> Add {{isDelimiter(c)}} and {{isEncapsulator(c)}} to CSVLexer
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CSV-71) Add convenience Methods to CSVLexer
Posted by "Benedikt Ritter (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CSV-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benedikt Ritter updated CSV-71:
-------------------------------
Attachment: Emmanuels_Performance_Test.patch
The one that Emmanuel posted a while ago on the ML. I'm using Windows 7 on a laptop with Core i3 M350 @ 2.27GHz and 4GB RAM. If the patch is that much slower on your system, it is likely that it will be slow on others. So we shouldn't apply it.
I've added Emmanuel's test to the ticket.
> Add convenience Methods to CSVLexer
> -----------------------------------
>
> Key: CSV-71
> URL: https://issues.apache.org/jira/browse/CSV-71
> Project: Commons CSV
> Issue Type: Sub-task
> Components: Parser
> Affects Versions: 1.0
> Reporter: Benedikt Ritter
> Fix For: 1.0
>
> Attachments: CSV-71.patch, Emmanuels_Performance_Test.patch
>
>
> Add {{isDelimiter(c)}} and {{isEncapsulator(c)}} to CSVLexer
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CSV-71) Add convenience Methods to CSVLexer
Posted by "Emmanuel Bourg (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CSV-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231402#comment-13231402 ]
Emmanuel Bourg commented on CSV-71:
-----------------------------------
How is the performance with this patch?
> Add convenience Methods to CSVLexer
> -----------------------------------
>
> Key: CSV-71
> URL: https://issues.apache.org/jira/browse/CSV-71
> Project: Commons CSV
> Issue Type: Sub-task
> Components: Parser
> Affects Versions: 1.0
> Reporter: Benedikt Ritter
> Fix For: 1.0
>
> Attachments: CSV-71.patch
>
>
> Add {{isDelimiter(c)}} and {{isEncapsulator(c)}} to CSVLexer
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira