Giter VIP home page Giter VIP logo

Comments (7)

chrisdew avatar chrisdew commented on July 23, 2024

Hi, I'm confused as to why this makes your deployment process slow.

Are you running "npm install protobuf" more than once on each machine? If so, why do you need to do this?

Perhaps I haven't understood the issue here?

from protobuf.

alexfernandez avatar alexfernandez commented on July 23, 2024

We need to run "npm install protobuf" multiple times on each machine, because our deployment process makes sure that all packages are installed before proceeding. It is quite convenient for us to have a single script that installs all npm dependencies, so that it is idempotent and it runs the same on new and on old machines.

This setup works well with all packages except for protobuf, which is compiled every time.

from protobuf.

chrisdew avatar chrisdew commented on July 23, 2024

The current build system was contributed by @seishun - perhaps you could ask him whether he know why it recompiles on each install?

Unfortunately for most users this is likely to be an irrelevant issue - though I do see why it is annoying for you. Perhaps you could create and contribute a fix?

from protobuf.

chrisdew avatar chrisdew commented on July 23, 2024

P.S. Build system was contributed here: a1205e7

Note: this page is huge and takes a minute or two to load on 10MBit broadband.

from protobuf.

alexfernandez avatar alexfernandez commented on July 23, 2024

We already have a workaround in place: one script to install and another to update. It is a bit annoying, and the issue is likely to bite others in the future, but my current knowledge of the npm build system is more likely to cause damage than to solve anything. At least now the issue is documented.

from protobuf.

AdamMagaluk avatar AdamMagaluk commented on July 23, 2024

@alexfernandez What are your install scripts doing that the normal npm process doesn't. If I have a package that depends on protobuf I just put '"protobuf" : "~0.8.6" in dependencies object in package.json. Then run npm install, it will compile protobuf and download any other needed packages, any npm install calls later skip the compiling and installation of the already installed package.

from protobuf.

alexfernandez avatar alexfernandez commented on July 23, 2024

@AdamMagaluk that is not our use case. Just run "npm install protobuf" from the command line. The output will look like:

$ npm install protobuf
npm http GET https://registry.npmjs.org/protobuf
npm http 304 https://registry.npmjs.org/protobuf

> [email protected] install /.../node_modules/protobuf
> node-gyp rebuild

and it will recompile all native code in the package every time.

On second inspection, apparently all native modules are recompiled every time, it is just that protobuf takes much, much longer than the rest. Closing issue. Thanks for your time!

from protobuf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.