Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

新增使用临时文件的选项,避免大量图片导出时OOM - #4093

Open
cxbiao wants to merge 1 commit into
alibaba:masterfrom
cxbiao:master
Open

新增使用临时文件的选项,避免大量图片导出时OOM#4093
cxbiao wants to merge 1 commit into
alibaba:masterfrom
cxbiao:master

Conversation

@cxbiao

@cxbiao cxbiao commented Mar 14, 2025

Copy link
Copy Markdown

新增使用临时文件的选项,避免大量图片导出时OOM
默认为false,图片全部放在内存中

@CLAassistant

CLAassistant commented Mar 14, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Programmer-yyds

Copy link
Copy Markdown

使用这个配置后在临时目录里产生大量临时文件,在释放资源时临时文件并没有被删除

public static void useTempFilePackageParts(boolean tempFilePackageParts) {
ZipPackage.setUseTempFilePackageParts(tempFilePackageParts);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该也有使用完删除临时文件的处理,然后将内存中的图片也删除。使用完强制执行

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants