gitgabrio opened a new issue, #2253:
URL: https://github.com/apache/incubator-kie-issues/issues/2253

   The following snippet is an example of code-generated "DecisionModels":
   
   ```java
       static {
           init(/* arguments provided during codegen */
           null, null, java.util.Set.of(), true, 
readResource(Application.class.getResourceAsStream("/valid_models/DMNv1_5/Importing_EmptyNamed_Model_With_Href_Namespace.dmn"),
 "UTF-8"), 
readResource(Application.class.getResourceAsStream("/valid_models/DMNv1_5/Imported_Model_Unamed.dmn"),
 "UTF-8"), 
readResource(Application.class.getResourceAsStream("/valid_models/DMNv1_5/TypeConstraintsChecks.dmn"),
 "UTF-8"), 
readResource(Application.class.getResourceAsStream("/valid_models/DMNv1_5/AllowedValuesChecksInsideCollection.dmn"),
 "UTF-8"));
       }
   ```
   
   The problem with that class are:
   1. `readResource(InputStream, String)` returns an `InputStreamReader` that 
contains an `InputStream`, which could lead to not-efficient resource consuming
   2. it has been reported at least once the case where at least 3500 DMN files 
are automatically generated; in this case, for each DMN, a `readResource` entry 
is written in the class, leading to “Error during processing model classes: 
code too large” error during compilation
   
   So, we need to devise a different approach to:
   1. limit the concurrently-opened InputStreams
   2. limit the size of codegenerated class
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to