Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest adding asynchronous import/export functionality. #4

Open
LiXunGuan opened this issue Jun 26, 2024 · 2 comments
Open

Suggest adding asynchronous import/export functionality. #4

LiXunGuan opened this issue Jun 26, 2024 · 2 comments

Comments

@LiXunGuan
Copy link

Requirement

When the frontend clicks on export, the backend should add an asynchronous export task. Once the task is completed, notify the download center for downloading.

Reference for the functionality: https://docs.laravel-excel.com/3.1/exports/queued.html

@carlin-rj
Copy link
Owner

这个之前我有考虑实现这个功能, 看过Maatwebsite\Excel队列实现源码,是将任务拆解成小任务使用批任务处理,但是每个任务都需要读取文件的内容(这里如果数据量大也是会内存溢出的)。如果切换到xlswriter拓展还不如用户自己推送到一个自定义的队列去处理效率更高点,这样并不需要多次读取文件内容然后写入文件了。

@LiXunGuan
Copy link
Author

这个之前我有考虑实现这个功能, 看过Maatwebsite\Excel队列实现源码,是将任务拆解成小任务使用批任务处理,但是每个任务都需要读取文件的内容(这里如果数据量大也是会内存溢出的)。如果切换到xlswriter拓展还不如用户自己推送到一个自定义的队列去处理效率更高点,这样并不需要多次读取文件内容然后写入文件了。

这个可以文档里面提一下,方便给个示例?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants