[llvm] [Object][Archive][NFC] Create all symbolic files objects before calculating offsets. (PR #85229)

Jacek Caban via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 06:46:22 PDT 2024


cjacek wrote:

> Taking a look at the change, I'm a little concerned about the potential impact on memory usage of this version of the PR. Previously, the code would only need one symbolic file to be in memory at a time, but now it requires all of them. I don't have any numbers, but I wouldn't be surprised in a large archive with many members with lots of symbols (not an unusual thing) if this change has drastically increased memory usage. I think it would be a good idea to do some performance analysis of the before and after of this change for particularly large archives.

Please note that symbolic file is stored in `MemberData` struct, which is returned by `computeMemberData`. `CurSymFile` is not destructed in the loop, it's moved to `Ret` vector instead, so we store all of them in memory with or without this patch. The memory usage impact of this PR is just one additional vector of pointers.

https://github.com/llvm/llvm-project/pull/85229


More information about the llvm-commits mailing list