Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speed question/issue #75

Open
m-prof opened this issue Jun 12, 2020 · 4 comments
Open

speed question/issue #75

m-prof opened this issue Jun 12, 2020 · 4 comments

Comments

@m-prof
Copy link

m-prof commented Jun 12, 2020

This is a follow-up to: #64

Thanks so much kaue! This works now for me, for all files I checked.

I did have a follow-up on speed: things slow down for files 1.5M or higher. For me (Win 10 Pro, Surface Pro, 16G RAM, Intel i7-7660U) when I tried a 3.9M file it took 42 minutes (command: jsonexport <json_filename> <output_filename>. Is this sort of time to complete expected?

@kaue
Copy link
Owner

kaue commented Jun 12, 2020

@m-prof can you try running the benchmark/benchmark.js?

@m-prof
Copy link
Author

m-prof commented Jun 12, 2020

Sorry for being a noob but I am not getting this to work: I am trying ~\jsonexport\benchmark>node benchmark.js from a command prompt and I get error messages:

internal/modules/cjs/loader.js:976
  throw err;
  ^

Error: Cannot find module 'benchmark'
Require stack:
- \npm\node_modules\jsonexport-master\benchmark\benchmark.js
�[90m    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:973:15)�[39m
�[90m    at Function.Module._load (internal/modules/cjs/loader.js:855:27)�[39m
�[90m    at Module.require (internal/modules/cjs/loader.js:1033:19)�[39m
�[90m    at require (internal/modules/cjs/helpers.js:72:18)�[39m
    at Object.<anonymous> (\npm\node_modules\�[4mjsonexport-master�[24m\benchmark\benchmark.js:3:17)
�[90m    at Module._compile (internal/modules/cjs/loader.js:1144:30)�[39m
�[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)�[39m
�[90m    at Module.load (internal/modules/cjs/loader.js:993:32)�[39m
�[90m    at Function.Module._load (internal/modules/cjs/loader.js:892:14)�[39m
�[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)�[39m {
  code: �[32m'MODULE_NOT_FOUND'�[39m,
  requireStack: [
    �[32m'\\npm\\node_modules\\jsonexport-master\\benchmark\\benchmark.js'�[39m
  ]
}

I assume I am not executing this correctly!

@kaue
Copy link
Owner

kaue commented Jun 13, 2020

@m-prof you are almost there :)
try running npm install first

@m-prof
Copy link
Author

m-prof commented Jun 13, 2020

Thanks. Not sure if this is sufficient but here is the output (there was a bunch of error messages also as well, let me know if I should post):

npm\node_modules\jsonexport\benchmark>node benchmark.js
Executed benchmark against node module: "jsonexport"
Count (1), Cycles (1), Elapsed (512.53 sec), Hz (0.00975936285335975 ops/sec)

Executed benchmark against node module: "jsonexport-stream"
Count (1), Cycles (1), Elapsed (10.388 sec), Hz (0.8795467729800702 ops/sec)

PS There were two output files (out.csv and out-no-streams.csv), the converted version of data.json. I can post them though they look fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants