React-native-ble-plx: npm install takes about 5 minutes to run

Created on 8 Mar 2018  路  6Comments  路  Source: Polidea/react-native-ble-plx

I have a RN project with bunch of native library but this library exclusively takes about ~3-5 minutes when running npm install the first time.
It looks like the native compilation is the reason of this (RxSwift complication, etc)
Is there a way libraries can be precompiled? like some sort of node-gyp prebuild equivalent? 馃

Thanks

enhancement help wanted stale

Most helpful comment

There is one thing which can be improved:

  • By updating binary releases used by Carthage we end up only compiling BLE framework. All dependencies are cached.

Additionaly we can:

  • Try to use static Swift framework to move compiling step to building process. That's how ObjC is working in most libraries.
  • Wait for Swift ABI to stabilize and use prebuild frameworks. Unfortunately it will take a while.

All 6 comments

There is one thing which can be improved:

  • By updating binary releases used by Carthage we end up only compiling BLE framework. All dependencies are cached.

Additionaly we can:

  • Try to use static Swift framework to move compiling step to building process. That's how ObjC is working in most libraries.
  • Wait for Swift ABI to stabilize and use prebuild frameworks. Unfortunately it will take a while.

Another possibility is to reimplement API using just one Swift static library without any dependencies such as RxBluetoothKit.

Same problem to me锛宯pm install is too slow

Use yarn add, it is faster than npm install.

@pulkonet i think yarn add is as slow as npm install regarding this problem. the same postinstall will run which is taking long time to compile. (I actually was using yarn when i created this issue ;))

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alfacommunication-alessandro picture alfacommunication-alessandro  路  3Comments

paulclark94 picture paulclark94  路  3Comments

BlackCod3 picture BlackCod3  路  3Comments

nriccar picture nriccar  路  3Comments

paddlefish picture paddlefish  路  4Comments