You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "David Bertoni (JIRA)" <xa...@xml.apache.org> on 2007/06/06 03:59:25 UTC

[jira] Created: (XALANC-647) XalanOtherEncodingWriter::writeNumericCharacterReference() is inefficient

XalanOtherEncodingWriter::writeNumericCharacterReference() is inefficient
-------------------------------------------------------------------------

                 Key: XALANC-647
                 URL: https://issues.apache.org/jira/browse/XALANC-647
             Project: XalanC
          Issue Type: Bug
    Affects Versions: CurrentCVS
            Reporter: David Bertoni
            Assignee: David Bertoni


This function formats a numeric character reference for any character that is not representable in the code page.  However, it uses the write() function to write the numeric character reference, which will then check each character to see if it can be represented in the local code page.  This is unnecessary, since the characters in a numeric character reference must be representable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANC-647) XalanOtherEncodingWriter::writeNumericCharacterReference() is inefficient

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANC-647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513635 ] 

David Bertoni commented on XALANC-647:
--------------------------------------

Since the buffer size is defined by an enum within the class definition, I think the risk is low.  I can add a comment to the enum to indicate that it cannot be reduced below the length of the longest possible numeric character reference.

> XalanOtherEncodingWriter::writeNumericCharacterReference() is inefficient
> -------------------------------------------------------------------------
>
>                 Key: XALANC-647
>                 URL: https://issues.apache.org/jira/browse/XALANC-647
>             Project: XalanC
>          Issue Type: Bug
>    Affects Versions: CurrentCVS
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>         Attachments: patch.diff
>
>
> This function formats a numeric character reference for any character that is not representable in the code page.  However, it uses the write() function to write the numeric character reference, which will then check each character to see if it can be represented in the local code page.  This is unnecessary, since the characters in a numeric character reference must be representable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANC-647) XalanOtherEncodingWriter::writeNumericCharacterReference() is inefficient

Posted by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANC-647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513588 ] 

Dmitry Hayes commented on XALANC-647:
-------------------------------------

I agree that every numeric character reference should be representable , but wouldn't be direct approach to the buffer little bit risky ? I thought that we had something like "writeSafe" functions for writing "always presentable" code points .  And there is a risk of "famous" buffer overrun problem : if the buffer happens to be defined small , even after the flush it may happen not to have enouph room to keep the "number". Thanks!

> XalanOtherEncodingWriter::writeNumericCharacterReference() is inefficient
> -------------------------------------------------------------------------
>
>                 Key: XALANC-647
>                 URL: https://issues.apache.org/jira/browse/XALANC-647
>             Project: XalanC
>          Issue Type: Bug
>    Affects Versions: CurrentCVS
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>         Attachments: patch.diff
>
>
> This function formats a numeric character reference for any character that is not representable in the code page.  However, it uses the write() function to write the numeric character reference, which will then check each character to see if it can be represented in the local code page.  This is unnecessary, since the characters in a numeric character reference must be representable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Closed: (XALANC-647) XalanOtherEncodingWriter::writeNumericCharacterReference() is inefficient

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XALANC-647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni closed XALANC-647.
--------------------------------


> XalanOtherEncodingWriter::writeNumericCharacterReference() is inefficient
> -------------------------------------------------------------------------
>
>                 Key: XALANC-647
>                 URL: https://issues.apache.org/jira/browse/XALANC-647
>             Project: XalanC
>          Issue Type: Bug
>    Affects Versions: CurrentCVS
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>             Fix For: CurrentCVS
>
>         Attachments: patch.diff
>
>
> This function formats a numeric character reference for any character that is not representable in the code page.  However, it uses the write() function to write the numeric character reference, which will then check each character to see if it can be represented in the local code page.  This is unnecessary, since the characters in a numeric character reference must be representable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANC-647) XalanOtherEncodingWriter::writeNumericCharacterReference() is inefficient

Posted by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANC-647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513638 ] 

Dmitry Hayes commented on XALANC-647:
-------------------------------------

Otherwise the patch is good , let's commit it . Thanks!

> XalanOtherEncodingWriter::writeNumericCharacterReference() is inefficient
> -------------------------------------------------------------------------
>
>                 Key: XALANC-647
>                 URL: https://issues.apache.org/jira/browse/XALANC-647
>             Project: XalanC
>          Issue Type: Bug
>    Affects Versions: CurrentCVS
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>         Attachments: patch.diff
>
>
> This function formats a numeric character reference for any character that is not representable in the code page.  However, it uses the write() function to write the numeric character reference, which will then check each character to see if it can be represented in the local code page.  This is unnecessary, since the characters in a numeric character reference must be representable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Resolved: (XALANC-647) XalanOtherEncodingWriter::writeNumericCharacterReference() is inefficient

Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XALANC-647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni resolved XALANC-647.
----------------------------------

       Resolution: Fixed
    Fix Version/s: CurrentCVS

Patch committed.

> XalanOtherEncodingWriter::writeNumericCharacterReference() is inefficient
> -------------------------------------------------------------------------
>
>                 Key: XALANC-647
>                 URL: https://issues.apache.org/jira/browse/XALANC-647
>             Project: XalanC
>          Issue Type: Bug
>    Affects Versions: CurrentCVS
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>             Fix For: CurrentCVS
>
>         Attachments: patch.diff
>
>
> This function formats a numeric character reference for any character that is not representable in the code page.  However, it uses the write() function to write the numeric character reference, which will then check each character to see if it can be represented in the local code page.  This is unnecessary, since the characters in a numeric character reference must be representable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org