Open jcjgithub opened 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: @.***>
修改了
大对象是这些
已经改了,取一下试试
我们昨天使用官网发布的 20230228 进行操作的时候 出现堆溢出 我们分析堆溢出产生的日志文件 定位到是这里有问题 。 我大致看了下这里的逻辑 是在判断 string 是否全都是 ASCII码 。 这里能否优化下呢?因为你们调用 getBytes 又会在内存里面 创建一份 byte数组 对象 。如果我理解的没问题 是判断 是不是全都是 ASCII码的话 可以采用判断每个字符的码值就行了 不用在去内存里面创建一份