Output large xml from a result set

We have an application in which an XML string is created from a stored proc result set and converted using XSLT to return to the calling servlet. This works great with a smaller data set, but causes a memory error with a large amount of data. What would be the ideal solution in this case?

+3
source share
3 answers

XSLT transformations generally require the entire dataset to be loaded into memory, so it’s easiest to get more memory.

If you can rewrite your XSLT, there are stream conversions for XML that allow incremental data processing.

+3
source

XML- , , Java. . ?

XML?

+1

.

, , . , , .

, . . . MaxPermSize JVM. .

This approach will have a limitation, even if you can transfer large datasets for a single user, it can go outOfMemory for multiple users.

An offer that may work for you.

  • Break it in an asynchronous process. Create large datasets to separate a process and load these datasets from another process.

  • When creating accessible datasets, you can very well control memory consumption using stream-based loading.

+1
source

Source: https://habr.com/ru/post/1796715/


All Articles