Pkg: Mention drawbacks in the readme

Created on 2 May 2017  Â·  7Comments  Â·  Source: vercel/pkg

As I understand this is a rebranding of the enclose module? Would love to know how this happened btw.

But, in original documentation, here – http://enclosejs.com/#compilation-srsly it says that resulting binary will be at least 2x slower, is that still the case? And if so, can you mention that in the readme? It would be better I think to also document how this sort of measurements was performed.

As well as any other possible drawbacks, besides performance and size

documentation

Most helpful comment

@simast Yes!

All 7 comments

If this is using the same snapshotting functionality that nwjs is utilizing, then it's _possible_ that the performance issues have been improved greatly by the v8 team. Might just be part of using ignition / turbofan?

@dvlsg please try passing --options ignition,turbo,turbo-from-bytecode to your pkg command line.

@igorklopov That's interesting, could you elaborate more? Does that mean with ignition and turbofan enabled (which is enabled by default from v8 5.9) - there won't be any performance drawbacks and the compiled code will be optimised during runtime?

@simast Yes!

Add Pros of pkg (and comparison to nexe) from https://github.com/zeit/pkg/issues/42 to README?

@markelog: NB: enclosejs.com is dead as of 3 May 2017

Hi there,

So I added --options ignition,turbo,turbo-from-bytecode to the build I just did and got the following error:

buffer.js:12
    super(arg1, arg2, arg3);
    ^

ReferenceError: this is not defined
    at FastBuffer (buffer.js:12:5)
    at createUnsafeBuffer (buffer.js:38:10)
    at allocate (buffer.js:190:12)
    at Function.Buffer.allocUnsafe (buffer.js:153:10)
    at Function.Buffer.concat (buffer.js:322:23)
    at Socket.<anonymous> ([eval]:5:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:189:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:551:20)
> Error! Error: Was not able to compile for '{"nodeRange":"node7","platform":"linux","arch":"x64","output":"/Users/steven.lambe/iot/index-linux","forceBuild":false,"fabricator":{"nodeRange":"node7","platform":"macos","arch":"x64","forceBuild":false,"binaryPath":"/Users/steven.lambe/.pkg-cache/v1.9/fetched-v7.6.0-macos-x64"},"binaryPath":"/Users/steven.lambe/.pkg-cache/v1.9/fetched-v7.6.0-linux-x64","slash":"/"}'
    at Socket.<anonymous> (/usr/local/lib/node_modules/pkg/lib-es5/producer.js:46:25)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at onwriteError (_stream_writable.js:341:10)
    at onwrite (_stream_writable.js:359:5)
    at fireErrorCallbacks (net.js:480:13)
    at Socket._destroy (net.js:521:3)
    at WriteWrap.afterWrite [as oncomplete] (net.js:815:10)

Once I removed turbo-from-bytecode though it seems to work. Am I missing something?

Building on Mac, targeting Mac, Linux, and Windows x64 with Node 7.

It just proves that flagged features are unstable. I will look into it later. However we should probably wait for node.js 8 with stable Ignition/TurboFan https://www.youtube.com/watch?v=YTAFT2blJDo

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ydubois-fr picture ydubois-fr  Â·  4Comments

bergheim picture bergheim  Â·  3Comments

Araknos picture Araknos  Â·  4Comments

j-brown picture j-brown  Â·  4Comments

Nisthar picture Nisthar  Â·  4Comments