You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Daniel John Debrunner (JIRA)" <de...@db.apache.org> on 2005/11/29 16:14:30 UTC
[jira] Created: (DERBY-731) org.apache.derby.impl.sql.compile.StringSlice is an inefficient way to do substring
org.apache.derby.impl.sql.compile.StringSlice is an inefficient way to do substring
-----------------------------------------------------------------------------------
Key: DERBY-731
URL: http://issues.apache.org/jira/browse/DERBY-731
Project: Derby
Type: Improvement
Components: SQL
Reporter: Daniel John Debrunner
Assigned to: Daniel John Debrunner
Priority: Trivial
Fix For: 10.2.0.0
StringSlicer is a class that is basically implementing String.substring() with an optional trim in an inefficient manner.
It creates a char array from the original string and uses this new array to create sub strings. This means one allocation
and copy for the original char array and another allocation and copy for every subsequent slice operation.
String.substring performs the same functionality but it can create sub-strings without the character array allocation
and copy by re-using the character arrray hidden within the original string.
I've been running tests with a additional code in StringSlicer that compares its output with that of String.substring with
no differences. One minor annoyance is that StringSlicer uses an inclusive end offset while String.substring uses an
exclusive end offset.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-731) org.apache.derby.impl.sql.compile.StringSlice is an inefficient way to do substring
Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-731?page=all ]
Dyre Tjeldvoll updated DERBY-731:
---------------------------------
Component: Performance
Added performance as a component
> org.apache.derby.impl.sql.compile.StringSlice is an inefficient way to do substring
> -----------------------------------------------------------------------------------
>
> Key: DERBY-731
> URL: http://issues.apache.org/jira/browse/DERBY-731
> Project: Derby
> Type: Improvement
> Components: SQL, Performance
> Reporter: Daniel John Debrunner
> Assignee: Daniel John Debrunner
> Priority: Trivial
> Fix For: 10.2.0.0
>
> StringSlicer is a class that is basically implementing String.substring() with an optional trim in an inefficient manner.
> It creates a char array from the original string and uses this new array to create sub strings. This means one allocation
> and copy for the original char array and another allocation and copy for every subsequent slice operation.
> String.substring performs the same functionality but it can create sub-strings without the character array allocation
> and copy by re-using the character arrray hidden within the original string.
> I've been running tests with a additional code in StringSlicer that compares its output with that of String.substring with
> no differences. One minor annoyance is that StringSlicer uses an inclusive end offset while String.substring uses an
> exclusive end offset.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (DERBY-731) org.apache.derby.impl.sql.compile.StringSlice is an inefficient way to do substring
Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-731?page=all ]
Daniel John Debrunner closed DERBY-731:
---------------------------------------
Resolution: Fixed
> org.apache.derby.impl.sql.compile.StringSlice is an inefficient way to do substring
> -----------------------------------------------------------------------------------
>
> Key: DERBY-731
> URL: http://issues.apache.org/jira/browse/DERBY-731
> Project: Derby
> Type: Improvement
> Components: SQL, Performance
> Reporter: Daniel John Debrunner
> Assignee: Daniel John Debrunner
> Priority: Trivial
> Fix For: 10.2.0.0
>
> StringSlicer is a class that is basically implementing String.substring() with an optional trim in an inefficient manner.
> It creates a char array from the original string and uses this new array to create sub strings. This means one allocation
> and copy for the original char array and another allocation and copy for every subsequent slice operation.
> String.substring performs the same functionality but it can create sub-strings without the character array allocation
> and copy by re-using the character arrray hidden within the original string.
> I've been running tests with a additional code in StringSlicer that compares its output with that of String.substring with
> no differences. One minor annoyance is that StringSlicer uses an inclusive end offset while String.substring uses an
> exclusive end offset.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-731)
org.apache.derby.impl.sql.compile.StringSlice is an inefficient way to do
substring
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dag H. Wanvik updated DERBY-731:
--------------------------------
Derby Categories: [Performance]
> org.apache.derby.impl.sql.compile.StringSlice is an inefficient way to do substring
> -----------------------------------------------------------------------------------
>
> Key: DERBY-731
> URL: https://issues.apache.org/jira/browse/DERBY-731
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Reporter: Daniel John Debrunner
> Assignee: Daniel John Debrunner
> Priority: Trivial
> Fix For: 10.2.1.6
>
>
> StringSlicer is a class that is basically implementing String.substring() with an optional trim in an inefficient manner.
> It creates a char array from the original string and uses this new array to create sub strings. This means one allocation
> and copy for the original char array and another allocation and copy for every subsequent slice operation.
> String.substring performs the same functionality but it can create sub-strings without the character array allocation
> and copy by re-using the character arrray hidden within the original string.
> I've been running tests with a additional code in StringSlicer that compares its output with that of String.substring with
> no differences. One minor annoyance is that StringSlicer uses an inclusive end offset while String.substring uses an
> exclusive end offset.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.