SPLWare / esProc

esProc SPL is a scripting language for data processing, with well-designed rich library functions and powerful syntax, which can be executed in a Java program through JDBC interface and computing independently.
http://doc.scudata.com/esproc/
Apache License 2.0
4.54k stars 323 forks source link

20230228内存溢出问题 #27

Open jcjgithub opened 1 year ago

jcjgithub commented 1 year ago

我们昨天使用官网发布的 20230228 进行操作的时候 出现堆溢出 我们分析堆溢出产生的日志文件 a123623d61bace6e875e72e756fe2b8 8f28d0f2488543c77f9ddcf4340163e 定位到是这里有问题 。 0e01340744a4e79fa599c2fcb119010 我大致看了下这里的逻辑 是在判断 string 是否全都是 ASCII码 。 这里能否优化下呢?因为你们调用 getBytes 又会在内存里面 创建一份 byte数组 对象 。如果我理解的没问题 是判断 是不是全都是 ASCII码的话 可以采用判断每个字符的码值就行了 不用在去内存里面创建一份

liwe1980 commented 1 year ago

这里的ba是个局部变量,能被回收的。只能说跑到这里溢出了,真正占了内存的不一定是这里。能看到内存里什么对象多吗?  

李伟 @.***

 

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年3月7日(星期二) 中午11:51 收件人: @.>; 抄送: @.***>; 主题: [SPLWare/esProc] 20230228内存溢出问题 (Issue #27)

我们昨天使用官网发布的 20230228 进行操作的时候 出现堆溢出 我们分析堆溢出产生的日志文件

定位到是这里有问题 。

我大致看了下这里的逻辑 是在判断 string 是否全都是 ASCII码 。 这里能否优化下呢?因为你们调用 getBytes 又会在内存里面 创建一份 byte数组 对象 。如果我理解的没问题 是判断 是不是全都是 ASCII码的话 可以采用判断每个字符的码值就行了 不用在去内存里面创建一份

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

liwe1980 commented 1 year ago

修改了

jcjgithub commented 1 year ago

image 大对象是这些

liwe1980 commented 1 year ago

已经改了,取一下试试