Last active
February 13, 2024 11:54
-
-
Save nikpros/b9878a7c06c74ec4024a46aeabcc928d to your computer and use it in GitHub Desktop.
test task by Leroy Merlin Node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Нужно разгрузить EventLoop выполняя тяжелую функцию heavyComputationFunction на большом кол-ве данных. | |
// P.S. попробовать реализовать по-блочное выполнение функции | |
const array2 = [...new Array(100000)].map(() => ({ | |
...largeDataset, | |
})); | |
array2.forEach(data => { | |
heavyComputationFunction(data) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment