Skip to content

Instantly share code, notes, and snippets.

@nikpros
Last active February 13, 2024 11:54
Show Gist options
  • Save nikpros/b9878a7c06c74ec4024a46aeabcc928d to your computer and use it in GitHub Desktop.
Save nikpros/b9878a7c06c74ec4024a46aeabcc928d to your computer and use it in GitHub Desktop.
test task by Leroy Merlin Node.js
// Нужно разгрузить 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