How do I stream large datasets in grails?
Application requires a large download ( a recordset sourced from SQL server with ~200开发者_StackOverflow中文版K rows or ~5MB) from a grails application. In c# I would use a dataReader but gorm with a hasMany defaults to sets and list that must be populated before using them.
What is the grails way to handle larger datasets that should be streamed?
I have not tried this myself, but I believe if you set the batchSize attribute for the relationship in the static mapping closure you can limit size of the collection to N results at a time. Sorry it's not a complete answer, but it's definitely where I'd start looking if you haven't done so already.
精彩评论