moqui / moqui-framework

Use Moqui Framework to build enterprise applications based on Java. It includes tools for databases (relational, graph, document), local and web services, web and other UI with screens and forms, security, file/resource access, scripts, templates, l10n, caching, logging, search, rules, workflow, multi-instance, and integration.
http://www.moqui.org
Other
279 stars 199 forks source link

Can the built-in download CSV be considered asynchronous #597

Open daiagou opened 1 year ago

daiagou commented 1 year ago

Moqui's table function is still very powerful, just show-csv-button="true" to support downloading forms as CSV. But the problem is that the data volume is slightly larger, and basically this download function cannot be used. (The generation time is relatively long and the performance consumption is also relatively high.) So, if this button is generated asynchronously, and another button is responsible for determining whether there are generated files, download them if there are, would it be more suitable for scenarios with large data volumes?

acetousk commented 1 year ago

This button could start a job that could be executed asynchronously. The retaining generated files and downloading them if they are there has a problem where if the data has changed, then the download csv button wouldn't download the latest data without some kind of checksum which may take just as long as downloading the whole thing anyways (unless there's a trick for this that I don't know about).

This would probably require some JS client side changes, a trigger as to whether the query needs to be done asynchronously, and using a job to generate the needed file and pass it to the client.