In addition to being affected by the memory-inefficiency of chunk uploading (#2291), sourcemap uploads are affected by even more severe memory usage issues.
From investigating a sourcemap upload with a memory profiler, I observed three large memory allocations which we should attempt to fix. Note that these tests were performed with --no-rewrite (more info on this later):
Lastly, without --no-rewrite, memory usage seems to be even worse. We still need to investigate the case where --no-rewrite is not passed to Sentry CLI.
In addition to being affected by the memory-inefficiency of chunk uploading (#2291), sourcemap uploads are affected by even more severe memory usage issues.
From investigating a sourcemap upload with a memory profiler, I observed three large memory allocations which we should attempt to fix. Note that these tests were performed with
--no-rewrite(more info on this later):sourcemapcrate. The crate's documentation states that it loads the entire sourcemap into memory, so we might end up still needing at least to allocate one sourcemap at a time into memory, even after addressing this problem.symbolicwhen we validate that the sourcemap is valid UTF-8. Fix is here: ref(sourcebundle): Check UTF-8 validity memory efficiently symbolic#890 and build: Bumpsymbolicto12.13.3#2346Lastly, without
--no-rewrite, memory usage seems to be even worse. We still need to investigate the case where--no-rewriteis not passed to Sentry CLI.