内存管理优化、错误处理优化、构建流程改进和路径处理优化 #428
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
第一次提交pr做贡献,有很多不懂的地方,有问题的话希望大佬多多指教,thanks!
概述
本次PR主要聚焦于内存管理优化、错误处理优化、构建流程改进和路径处理优化。
主要变更
修复的问题
图片加载错误处理修复
img为nil时调用Close()SVG文件处理优化
性能优化
图片预取处理优化
内存管理优化
ExtraParams类型定义encoder/memory_manager.go中的ExtraParams从本地类型改为使用config.ExtraParams配置优化
默认路径更新
./pics)更新为绝对路径(/opt/pics)./exhaust)更新为绝对路径(/opt/exhaust)绝对路径处理优化
helper/metadata.go中的绝对路径处理逻辑内存管理类型统一
ConversionJob.ExtraParams类型从本地定义改为使用config.ExtraParamsDockerfile配置优化
config.json的sed替换逻辑,更精确匹配目标字符串""改为"./exhaust",避免误替换其他空字符串配置项影响范围