[ 
https://issues.apache.org/jira/browse/JAXME-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525234
 ] 

Jose Luis Huertas commented on JAXME-94:
----------------------------------------

I send you my first approach to this issue that was not disruptive at all, so I 
think it can be applied to the maintenance branch.

It doesn't reduce the total amount of generated code, just refactors it 
dividing into private methods (one for each state), but it works.

I have included an unit test based on the example provided by Robert (with 100 
elements) that fails before applying the patch (the generated classes don't 
compile) and pass after applying it.
 
With 250 elements the solution still works, but the generated code is huge and 
probably you will need to change the ant heap settings to not run out of memory.

Regarding to the previous patch, I'm trying to change the method 
Matcher.hitEnd() for one equivalent that works with JDK 1.4, but I still have 
not found a suitable one :( I will apply your suggested performance 
optimizations to the next patch.

> startElement method larger than 64KB when using a large amount of 
> complexType's
> -------------------------------------------------------------------------------
>
>                 Key: JAXME-94
>                 URL: https://issues.apache.org/jira/browse/JAXME-94
>             Project: JaxMe
>          Issue Type: Improvement
>          Components: JaxMe Core
>    Affects Versions: 0.5, 0.6
>         Environment: All
>            Reporter: Robert Eric Reeves
>            Assignee: Jochen Wiedmann
>            Priority: Critical
>             Fix For: 0.5, 0.6
>
>         Attachments: test.xsd, veryLongSequences-patch-0.5.2.diff, 
> veryLongSequences-patch-0.6-SNAPSHOT.diff
>
>
> Using an XSD that has a complexType with ~50 child complexTypes in a 
> sequence, the generate Java code has a method startElement that is too large 
> for javac.
> Jose Luis Huertas Fernández has created a patch to fix this error. I will be 
> attaching it to this issue. There are two patches. One for 5.2 and the other 
> for 6.0.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to