sentry-android-gradle-plugin icon indicating copy to clipboard operation
sentry-android-gradle-plugin copied to clipboard

Speed up source collection for Source Context

Open adinauer opened this issue 2 years ago • 2 comments

Problem Statement

Currently we're copying all sources.

Extracted out of https://github.com/getsentry/sentry-java/issues/633

Solution Brainstorm

Speed up plugin e.g. by symlinking files instead of copying; needs test on how slow this actually is for larger projects - if

adinauer avatar Jun 09 '23 09:06 adinauer

Symlinking only works on unix systems and not sure how well it works with all the gradle shenanigans around caching, config avoidance, up-to-dateness and whatnot. A better approach is probably to let the CLI do the collection job and just pass the source paths there. This way we'd just copy once (directly to the source bundle) instead of pre-copying into a single folder first.

Has to tweak this codepath probs: https://github.com/getsentry/sentry-cli/blob/987e9337c1d2f59278583915714b7f61c5e8c605/src/commands/debug_files/bundle_jvm.rs#L89

romtsn avatar Mar 26 '25 08:03 romtsn

Symlinking only works on unix systems

EDIT: looks like it's possible to do that through Java's NIO package on Windows, but requires admin privileges and we definitely don't wanna deal with that

romtsn avatar Mar 26 '25 08:03 romtsn