bytedance / ByteX

ByteX is a bytecode plugin platform based on Android Gradle Transform API and ASM. 字节码插件开发平台
Apache License 2.0
3.15k stars 463 forks source link

R too large problem #130

Closed bytebeats closed 2 years ago

bytebeats commented 2 years ago

I only saw Context#shouldDiscardRClasses(which size is 1000) to collect R[#group].xxx information and then inline their values in JarInput/DirectoryInput.

But what if R too large to cause Context#shouldDiscardRClasses OOM?

What's the solution to this problem? Is it in this package?

Thanks in advance.

TellH commented 2 years ago

shouldDiscardRClasses initial size is 1000, it can expand capacity automatically, so don't worry. So as to OOM problem, it's hard to imagine how it would happen, unless your project is very very large...