Make runtime footprint smaller #44
Replies: 4 comments 4 replies
-
I really like the idea. Implementing that we could also detect runtime version change and force a clean of platforms in this case. Could prevent a lot of false positive bug reports. |
Beta Was this translation helpful? Give feedback.
-
I've mentioned this before, but prisma is a good example of this. https://www.npmjs.com/package/@prisma/engines is responsible for downloading and setting up the versions. They use https://binaries.prisma.sh/ They also allow you to specify specific files for it to use, so if you want to test some other binary version you just need to specify some environment variables |
Beta Was this translation helpful? Give feedback.
-
I think a simpler solution is to publish ios runtime on Pods & android runtime on maven. This makes npm installs small & gradle/cocoapods hande all the painful stuff for us automatically when you build the native app. |
Beta Was this translation helpful? Give feedback.
-
@ammarahm-ed I dont think pods can actually.host any file. Pod repo only holds manifests. The file needs to be hosted somewhere else. |
Beta Was this translation helpful? Give feedback.
-
Right now if you are working with multiple projects, all of them have a pretty large
node_modules
folder, partially due to the size of the ios and android runtimes, and a lot of storage is wasted and it adds up quickly.Proposal: make
@nativescript/ios
and@nativescript/android
lightweight "placeholders" that indicate to the CLI (or a postinstall script / script invoked by the CLI) where/how to fetch the runtime files and reuse them if they have already been downloaded to a global cache directory.ns clean --full
or something similarThe actual runtime files would need to be hosted perhaps as GitHub release assets, this definitely complicates the publish pipeline, however we are (I believe) getting close to the npm package size limit, so sooner or later we might need to do this anyways.
/cc @edusperoni @triniwiz @NathanWalker
Beta Was this translation helpful? Give feedback.
All reactions