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

Writing to the database is slow after uploading a large file #607

Closed
magicindex opened this issue Nov 10, 2024 · 2 comments
Closed

Writing to the database is slow after uploading a large file #607

magicindex opened this issue Nov 10, 2024 · 2 comments

Comments

@magicindex
Copy link

Writing to the database is slow after uploading a large file:

  1. I uploaded a 4.92G file and it was uploaded quickly, but the system kept waiting in circles. At this time, I found that the database was growing little by little. It took a long time to show up in files. Is this normal?
  2. I saw that the database cannot be automatically reduced after it grows. Can I add a scheduled scan to automatically clean up the remaining space in the database?

上传大文件后向数据库中写入很慢
1、上传了一个4.92G的文件,很快就传完,但是系统一直在转圈等待,这个时候发现数据库正在一点一点增长。等了很长时间才在files里面显示出来,这个是否正常现象。
2、看到有数据库增长后不能自动缩小的情况,能不能增加定时扫描自动清理数据库剩余空间。

@mtlynch
Copy link
Owner

mtlynch commented Nov 10, 2024

Thanks for reporting this!

I uploaded a 4.92G file and it was uploaded quickly, but the system kept waiting in circles. At this time, I found that the database was growing little by little. It took a long time to show up in files. Is this normal?

Yes, this is a known issue: #355

There is a possible fix in #567 but I haven't had time to finish that work. That would potentially improve performance and make large files usable.

I saw that the database cannot be automatically reduced after it grows. Can I add a scheduled scan to automatically clean up the remaining space in the database?

I used to have this, but it ended up causing a lot of headaches (#532), so I no longer would take a PR that added it back, but you could write a cronjob outside of PicoShare that regularly compacts the database.

@mtlynch mtlynch closed this as completed Nov 10, 2024
@magicindex
Copy link
Author

1、It is recommended that you add a manual recycling button. Click the button manually to pause the program, recycle the database space, and automatically start the program after completion. You can also set a time limit before you can click the second time. This can improve the usability of the program. Not everyone has the ability to configure the recycling program. Can be integrated into the program page as an additional script.

2、Expect optimization of large file transfer.

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