react-native-svg icon indicating copy to clipboard operation
react-native-svg copied to clipboard

Significant Increase in Android Build Time for react-native-svg on CNAME Djinni After Upgrading to Expo SDK 53

Open yunusyuksel opened this issue 11 months ago • 3 comments

Description

After upgrading from Expo SDK 50 to Expo SDK 53, I noticed a significant increase in compilation time for the react-native-svg package on the Android platform. The build process only for react-native-svg, run via Fastlane on GitHub Actions, now takes approximately 15 minutes.

The issue specifically occurs during the execution of the Gradle task:

gradle(
  task: android_task,
  build_type: ENV['BUILD_TYPE'],
  project_dir: File.absolute_path('../android'),
  properties: {
    'android.injected.signing.store.file' => ENV['ANDROID_KEYSTORE_FILE'],
    'android.injected.signing.store.password' => ENV['ANDROID_KEYSTORE_PASSWORD'],
    'android.injected.signing.key.alias' => ENV['ANDROID_KEYSTORE_ALIAS'],
    'android.injected.signing.key.password' => ENV['ANDROID_KEYSTORE_ALIAS_PASSWORD'],
  }
)

Here are the relevant logs from the build process:

[12:20:51]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:32:43: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:20:51]: ▸ C/C++:    32 |   dispatchEvent("load", [$event=std::move($event)](jsi::Runtime &runtime) {
[12:20:51]: ▸ C/C++:       |                                           ^
[12:20:51]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:33:10: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:20:51]: ▸ C/C++:    33 |     auto $payload = jsi::Object(runtime);
[12:20:51]: ▸ C/C++:       |          ^
[12:20:51]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:36:40: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:20:51]: ▸ C/C++:    36 |   source.setProperty(runtime, "width", $event.source.width);
[12:20:51]: ▸ C/C++:       |                                        ^
[12:20:51]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:37:41: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:20:51]: ▸ C/C++:    37 |   source.setProperty(runtime, "height", $event.source.height);
[12:20:51]: ▸ C/C++:       |                                         ^
[12:20:51]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:38:38: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:20:51]: ▸ C/C++:    38 |   source.setProperty(runtime, "uri", $event.source.uri);
[12:20:51]: ▸ C/C++:       |                                      ^
[12:20:51]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:39:3: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:20:51]: ▸ C/C++:    39 |   $payload.setProperty(runtime, "source", source);
[12:20:51]: ▸ C/C++:       |   ^
[12:20:51]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:41:12: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:20:51]: ▸ C/C++:    41 |     return $payload;
[12:20:51]: ▸ C/C++:       |            ^
[12:20:51]: ▸ C/C++: 9 warnings generated.
[12:21:31]: ▸ > Task :app:configureCMakeRelWithDebInfo[armeabi-v7a]
[12:22:01]: ▸ > Task :app:buildCMakeRelWithDebInfo[armeabi-v7a]
[12:29:15]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:38:38: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:29:15]: ▸ C/C++:    38 |   source.setProperty(runtime, "uri", $event.source.uri);
[12:29:15]: ▸ C/C++:       |                                      ^
[12:29:15]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:39:3: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:29:15]: ▸ C/C++:    39 |   $payload.setProperty(runtime, "source", source);
[12:29:15]: ▸ C/C++:       |   ^
[12:29:15]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:41:12: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:29:15]: ▸ C/C++:    41 |     return $payload;
[12:29:15]: ▸ C/C++:       |            ^
[12:29:15]: ▸ C/C++: 9 warnings generated.
[12:29:54]: ▸ > Task :app:configureCMakeRelWithDebInfo[x86_64]
[12:30:24]: ▸ > Task :app:buildCMakeRelWithDebInfo[x86_64]
[12:33:25]: ▸ C/C++: ninja: Entering directory `/home/runner/work/<project_name>/<project_name>/android/app/.cxx/RelWithDebInfo/6g592f39/x86_64'
[12:33:25]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:31:44: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:33:25]: ▸ C/C++:    31 | void RNSVGImageEventEmitter::onLoad(OnLoad $event) const {
[12:33:25]: ▸ C/C++:       |                                            ^
[12:33:25]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:32:26: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:33:25]: ▸ C/C++:    32 |   dispatchEvent("load", [$event=std::move($event)](jsi::Runtime &runtime) {
[12:33:25]: ▸ C/C++:       |                          ^
[12:33:25]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:32:43: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:33:25]: ▸ C/C++:    32 |   dispatchEvent("load", [$event=std::move($event)](jsi::Runtime &runtime) {
[12:33:25]: ▸ C/C++:       |                                           ^
[12:33:25]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:33:10: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:33:25]: ▸ C/C++:    33 |     auto $payload = jsi::Object(runtime);
[12:33:25]: ▸ C/C++:       |          ^
[12:33:25]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:36:40: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:33:25]: ▸ C/C++:    36 |   source.setProperty(runtime, "width", $event.source.width);
[12:33:25]: ▸ C/C++:       |                                        ^
[12:33:25]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:37:41: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:33:25]: ▸ C/C++:    37 |   source.setProperty(runtime, "height", $event.source.height);
[12:33:25]: ▸ C/C++:       |                                         ^
[12:33:25]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:38:38: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:33:25]: ▸ C/C++:    38 |   source.setProperty(runtime, "uri", $event.source.uri);
[12:33:25]: ▸ C/C++:       |                                      ^
[12:33:25]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:39:3: warning: '$' in identifier [-Wdollar-in-identifier-extension]
[12:33:25]: ▸ C/C++:    39 |   $payload.setProperty(runtime, "source", source);
[12:33:25]: ▸ C/C++:       |   ^
[12:33:25]: ▸ C/C++: /home/runner/work/<project_name>/<project_name>/node_modules/react-native-svg/android/build/generated/source/codegen/jni/react/renderer/components/rnsvg/EventEmitters.cpp:41:12: warning: '$' in identifier [-Wdollar-in-identifier-extension]

Steps to reproduce

  1. Upgrade Expo SDK from version 50 to 53.
  2. Set up a build pipeline using Fastlane and GitHub Actions for an Android project.
  3. Observe the compilation time for the react-native-svg package.

Snack or a link to a repository

Not possible

SVG version

15.11.2

React Native version

0.79.2

Platforms

Android

JavaScript runtime

Hermes

Workflow

Expo Dev Client

Architecture

Fabric (New Architecture)

Build type

Release app & production bundle

Device

Real device

Device model

No response

Acknowledgements

Yes

yunusyuksel avatar May 09 '25 12:05 yunusyuksel

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

github-actions[bot] avatar May 09 '25 12:05 github-actions[bot]

same problem

dmoreno85 avatar Jun 02 '25 05:06 dmoreno85

me too

ananjaemin avatar Jul 16 '25 04:07 ananjaemin