v8 Questions

1

Solved

The following code with callback argument runs faster in the first loop. const fn = (length, label, callback) => { console.time(label); for (let i = 0; i < length; i++) { callback &amp...
Mulligan asked 25/7, 2024 at 9:18

2

Solved

Trying to generate a number using MAX_SAFE_INTEGER I noticed something strange, I'm sure it has to do with the way numbers are stored in JavaScript, but I don't understand what exactly it is. // Al...
Gombach asked 29/4, 2024 at 18:6

4

Solved

I'm looking for a solution for embedding the Google JavaScript engine V8 in my Java application. Have you got some solutions?
Treytri asked 16/6, 2011 at 9:44

8

Solved

V8 is an important part of node.js, which uses the Google V8 Javascript engine. Building V8 on my windows box [Windows 7/64-bit] is going to take me hours of grabbing and installing tools I'm not f...
Transmutation asked 27/1, 2011 at 16:26

4

Solved

I know that the async await is the new Promise in the town and it is a new way to write asynchronous code and I also know that We didn’t have to write .then, create an anonymous function to handle...
Pavlov asked 28/11, 2017 at 5:52

7

Solved

I'm having some trouble to understand how Node.js acts based on the parameter max-old-space-size. In my case, for example, I'm running two t2.small AWS instances (2GB of RAM). Not sure why, but I d...
Hemeralopia asked 22/1, 2018 at 17:24

1

Solved

I've been doing a lot of reading on V8 Bytecode, specifically Bytenode and Electron-Vite's implementation, and how they are advertised as a way to protect source code, but that doesn't actually see...
Bluestone asked 1/3, 2024 at 18:24

13

Solved

When I run /(a)/g.exec('a a a ').length I get 2 but I thought it should return 3 because there are 3 as in the string, not 2! Why is that? I want to be able to search for all occurances...
Forzando asked 29/6, 2012 at 23:52

10

Solved

I'm building a .NET 3.5 application and have the need to evaluate JS code on the server - basically a user provided rule set that can work within a browser or on the server. Managed JS is not an op...
Glossology asked 10/12, 2008 at 17:47

6

Solved

From the official documentation (source): process.memoryUsage() Returns an object describing the memory usage of the Node process measured in bytes. var util = require('util'); console.log...
Hilten asked 19/8, 2012 at 0:45

3

Solved

Specifically talking about (server side) V8, and assuming I'm not concerned about accuracy because I can detect and compensate for it, could I literally set up thousands of relatively simple timeou...
Dutiable asked 28/8, 2012 at 22:57

2

I'm trying to understand the contents of a heapdump generated by google chrome tools. I understand that there is already a in-browser heap dump inspector but I'm interested in writing a CLI that pa...
Aylmar asked 19/11, 2015 at 18:44

6

Solved

Scenario: Consider the following is the part of code from a node web app. app.get('/users/:id?', function(req, res, next){ var id = req.params.id; if (id) { // do something } else { next(); /...
Languor asked 29/5, 2013 at 9:39

6

Solved

I was making a large Map in Node.js v11.9.0 and it kept failing with "FATAL ERROR: invalid table size Allocation failed - JavaScript heap out of memory". My map's keys and values shouldn't be getti...
Retroflexion asked 31/1, 2019 at 3:30

6

Solved

Node features the way to increase the heap size via passing in the --max-old-space-size command line flag. In create-react-app projects everything depends on the use of react-scripts. How can I pas...
Deborahdeborath asked 18/5, 2017 at 11:21

2

Solved

Is it possible to view the machine code (x86 instructions) that a browser ultimately generates from my JavaScript? E.g. --- Raw source --- function add(a, b){ return a + b; } ... --- Code --- sou...
Reciprocal asked 19/12, 2019 at 14:38

4

Solved

In doing a little testing (Chrome on macOS) of the Array.prototype.fill() method, its clearly almost twice as slow (if not slower) than simply creating your own for loop and filling your array. Cl...
Boresome asked 17/2, 2018 at 0:32

15

Solved

Is there any way to efficiently check if the variable is Object or Array, in NodeJS & V8? I'm writing a Model for MongoDB and NodeJS, and to traverse the object tree I need to know if the obj...
Papyrus asked 12/1, 2012 at 11:12

5

Solved

I got a fatal error reading a file that was too big to fit in a buffer. FATAL ERROR: v8::Object::SetIndexedPropertiesToExternalArrayData() length exceeds max acceptable value Or, RangeError: &quo...
Lucy asked 23/1, 2012 at 15:49

8

Solved

In nodejs, the only way to execute external commands is via sys.exec(cmd). I'd like to call an external command and give it data via stdin. In nodejs there does yet not appear to be a way to open a...
Practise asked 22/11, 2009 at 20:21

5

Solved

In JavaScript I have a var str = ".a long string that contains many lines..." In case of exception that caused by eval(str); I had like to catch it and print the the line number that caused the ex...
Arpent asked 15/8, 2010 at 19:59

1

I'm struggling to set up coverage correctly using Playwright. It reports 0 coverage in all files (except the test files themselves, if I include them). I'm getting inspiration from https://playwrig...
Imperil asked 15/2, 2022 at 14:35

3

Solved

I'm trying to create a class with some fields on Google Apps Scripts. I can't even save the file. From what I understand of this SO answer, I'm using the correct syntax for class fields. V8 runtime...
Roundup asked 8/2, 2022 at 22:50

1

Solved

I've been trying to track down a small memory leak in my ReactJS web app. It increases by 10-30 mb over the course of 10 minutes or so. I took 3 heap snap shots using the chrome dev tools: 1 after ...
Gliadin asked 26/1, 2023 at 16:37

2

Solved

We have a very stateful NodeJS based web server (Meteor) that occasionally, randomly becomes slow in production. The problem is not reproducible in any of our tests, and we don't know what's trigge...
Pedometer asked 23/1, 2020 at 11:48

© 2022 - 2025 — McMap. All rights reserved.