You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2010/11/22 12:55:14 UTC

[jira] Created: (UIMA-1945) convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors

convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors
----------------------------------------------------------------------------------------

                 Key: UIMA-1945
                 URL: https://issues.apache.org/jira/browse/UIMA-1945
             Project: UIMA
          Issue Type: Improvement
          Components: Core Java Framework
            Reporter: Marshall Schor
            Assignee: Marshall Schor
             Fix For: 2.3.1SDK


User has reported running out of stack space - traced to long UIMA list which was being copied using the CasCopier utility, which places two "calls" for each element of the list on the Java stack.

Convert this to a non-recursion implementation.

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


Re: [jira] Commented: (UIMA-1945) convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors

Posted by Burn Lewis <bu...@gmail.com>.
Also lists are so simple they barely need the power and overhead of
recursion ... they're often mentioned along with arrays in our documentation
so users might expect their processing overhead to be similar.

Burn.

[jira] Commented: (UIMA-1945) convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors

Posted by "Eddie Epstein (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934461#action_12934461 ] 

Eddie Epstein commented on UIMA-1945:
-------------------------------------

bq. Can't they just increase the stack size of the JVM? 

Are you serious? Should this UIMA feature be documented as: "If a large list FS is created in the CAS, and the CasCopier is used, be sure to increase the JVM stack size accordingly?"

> convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors
> ----------------------------------------------------------------------------------------
>
>                 Key: UIMA-1945
>                 URL: https://issues.apache.org/jira/browse/UIMA-1945
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>             Fix For: 2.3.1SDK
>
>
> User has reported running out of stack space - traced to long UIMA list which was being copied using the CasCopier utility, which places two "calls" for each element of the list on the Java stack.
> Convert this to a non-recursion implementation.

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


[jira] Commented: (UIMA-1945) convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors

Posted by "Thilo Goetz (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934454#action_12934454 ] 

Thilo Goetz commented on UIMA-1945:
-----------------------------------

Is this really necessary?  The code is not exactly transparent as it is, and it will just get more complicated if you turn the relatively straightforward recursion into an iteration.  Can't they just increase the stack size of the JVM?

> convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors
> ----------------------------------------------------------------------------------------
>
>                 Key: UIMA-1945
>                 URL: https://issues.apache.org/jira/browse/UIMA-1945
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>             Fix For: 2.3.1SDK
>
>
> User has reported running out of stack space - traced to long UIMA list which was being copied using the CasCopier utility, which places two "calls" for each element of the list on the Java stack.
> Convert this to a non-recursion implementation.

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


[jira] Commented: (UIMA-1945) convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors

Posted by "Thilo Goetz (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934469#action_12934469 ] 

Thilo Goetz commented on UIMA-1945:
-----------------------------------

Why not?  This is a perfectly normal recursive algorithm.  CAS lists (and FSs in general) are recursive data structures, and they come with recursive algorithms.  If your recursive data structures are so deep as to require an increased stack size, that seems perfectly natural to me.  Are we to disallow recursive algorithms on FSs in general?  Or flatten each when somebody encounters a problem?  I think not.


> convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors
> ----------------------------------------------------------------------------------------
>
>                 Key: UIMA-1945
>                 URL: https://issues.apache.org/jira/browse/UIMA-1945
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>             Fix For: 2.3.1SDK
>
>
> User has reported running out of stack space - traced to long UIMA list which was being copied using the CasCopier utility, which places two "calls" for each element of the list on the Java stack.
> Convert this to a non-recursion implementation.

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


[jira] Commented: (UIMA-1945) convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors

Posted by "Eddie Epstein (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934477#action_12934477 ] 

Eddie Epstein commented on UIMA-1945:
-------------------------------------

I think there is a difference between user code recursion requiring modification of default JVM parameters and having an unnecessary limitation in UIMA framework code that doesn't have to be there. Not trying to be inflammatory here, just happen to be the user that suffered lost hours because of this problem.

> convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors
> ----------------------------------------------------------------------------------------
>
>                 Key: UIMA-1945
>                 URL: https://issues.apache.org/jira/browse/UIMA-1945
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>             Fix For: 2.3.1SDK
>
>
> User has reported running out of stack space - traced to long UIMA list which was being copied using the CasCopier utility, which places two "calls" for each element of the list on the Java stack.
> Convert this to a non-recursion implementation.

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


[jira] Closed: (UIMA-1945) convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors

Posted by "Marshall Schor (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-1945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor closed UIMA-1945.
--------------------------------

    Resolution: Fixed

> convert recursive impl of CAS Copier to non-recursive to avoid out-of-stack space errors
> ----------------------------------------------------------------------------------------
>
>                 Key: UIMA-1945
>                 URL: https://issues.apache.org/jira/browse/UIMA-1945
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>             Fix For: 2.3.1SDK
>
>
> User has reported running out of stack space - traced to long UIMA list which was being copied using the CasCopier utility, which places two "calls" for each element of the list on the Java stack.
> Convert this to a non-recursion implementation.

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