Answer the question
In order to leave comments, you need to log in
Why is JSON parsing speed slower on the server than in the browser?
Hello!
I need to upload files to JSON and
parse from JS code. I'm testing several options:
1 using browser workers (without using CacheAPI) all file requests are made via HTTP but everything is on the local dev computer
2 I'm using nodeJS workers. Nodejs launched microservices that process requests. JSON files are read from local disk
in both cases using JSON.parse(data)
let pStart = performance.now();
let res = JSON.parse(data);
let pEnd = performance.now();
BundlePerformance.add({ 'String parsing': pEnd - pStart });
Answer the question
In order to leave comments, you need to log in
The code does not help to understand at least something.
How do you download, from where, what.
Here is a server load, everything works instantly on some server in a sandbox with a file of ~ 30mb.
Everything else depends on the environment, Internet speed, etc.
https://codesandbox.io/s/node-js-forked-c77nk?file...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question