News for hackers. Stuff that matters.
Re:A binary tree of all Pythagorean triples by akomtu on Thursday November 21, 2024 @03:59PM (#42208591)
A simple trick to solve nearly all freezing problems: move the computations to a background thread, aka Worker in JS terms.
Re:A binary tree of all Pythagorean triples by aabhay on Thursday November 21, 2024 @09:48PM (#42210708)
Another trick — use comlink (https://github.com/GoogleChromeLabs/comlink) to make the worker thread into essentially an async API of your local methods.