I'm building a website with react. whenever I start react app using npm start. it takes too much time to exicute (almost 30-40 minutes). and after starting the app my laptop be too much slower. How can I fix this problem.?
Note: I have used yarn start and almost same result.
Related
I am facing issue in React NextJs Node where if i try to do pm2 reload it takes time to register port as i guess its scan all files of project before restarting it and due to my public/media size is 10 TB its hang up. I tried --ignore-watch options as well but not worked not sure if implemented wrong.
Ever since I upgraded to Big Sur, I've noticed that Sophos has begun to interfere dramatically whenever I run Jest tests. CPU usage for Sophos spikes to around 400% when running even a modest Jest test program, with 71 tests currently taking 98.6 seconds to run. After the Jest process completes, Sophos goes back to sleep and no longer takes up substantial resources.
I run these tests from my terminal using Node. My hypothesis is that the problem is actually between Node and Sophos, and it's just exacerbated by the way that Jest runs its tests.
Has anyone come across this problem before, and is there anything I can do to convince Sophos to leave Node alone?
For what it's worth, the tests themselves are bog-standard JS and React unit tests, with the React tests written using React Testing Library.
Running evaluateJavaScript on a WKWebView to inject a JS script can take quite some time to run on a device.
The JS script is quite complex, but is is normal for evaluateJavascript to take 20-30 seconds to run?
I'm using forever to restart my Node server whenever I change a file. However, it takes 5-10 seconds even though I don't have much code yet. I think there may a configuration problem or an unnecessary slow module. How would I figure out what Node is doing during those 5-10 seconds?
I have this app I'm developing and I thought of moving the VM I was using to real hardware. My Raspberry Pi 2 came to mind, a quad-core 900mhz ARM v7 with 1GB of ram. This hardware clocks at twice the speed I set my VM to run (a typical low end VPS equivalent) so it should be more than enough.
Installed Raspbian, nginx and the nodejs package from their repository using apt-get. Everything is super! But I noticed this distinct slowness when accessing the app. It's like a 7-10 sec pause before everything loads.
To test it further I installed full-fledged Node.js app called Tiddlywiki which I installed and used many times in the past. And it's true, there it was again that 7-10 sec delay when you refresh the page.
The app seems to run fine, POST and GET is instant once it's up and running in the Web Browser, but the delay is there if I refresh the page.
NOTE: If I restart the Pi and wait for it to restart the first time I access the app URL the delay seems to double, about 15 sec. Nginx html pages seem lightning fast in comparison.
Any thoughts on this?
Apparently Node.JS apps are quite fast on the Raspberry Pi 2.
The app I was test driving had and still has some weird behavior when using a password to encrypt content and starting the server with --password 12345678 made everything run very slow.
Running the app without a password is lightning fast.
PS. The app in question was Tiddlywiki, which can be run as a server for collaboration and such.