A
A
AlexNet32021-07-09 16:38:54
Socket.io
AlexNet3, 2021-07-09 16:38:54

Why is a js script running faster outside of a tab in a browser js?

Hello, I have a task to make a script with large calculations and for this I decided to interact with socket.io . The bottom line is that the client part only gives, let's say, the ID that the server needs to perform, and the server already performs a series of calculations and returns the result.
Now, to the point, when I am in the browser on this tab, the same calculation is performed in 24 seconds and when I am in another browser tab, the calculation is performed in 3 seconds, why is this happening?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sasmoney, 2021-08-07
@sasmoney

caching

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question