51
Comments
  • 2
    ++ for the best doctor
  • 6
    The fuck are those tags??
  • 0
    @b3b3 Shouldn't I?
    I've got used to Instagram's method of posting:)
  • 3
    setTimeout(() => console.log("lol"), 120000);

    Vs.

    console.log("lol");

    ?
  • 0
    @blackfaded Why there isn't any sleep like function in javascript without complicated codes?
  • 1
    function sleep(time) {
    return new Promise(resolve => {
    setTimeout(()=> resolve(), time));
    }
    }

    ...
    await sleep(6000);
  • 0
    @blackfaded Does it block the hole process?
  • 0
    @parsadev Because JavaScript is inherently single threaded and doesn't have fibers so the control flow can't just halt in place
  • 0
    @12bitfloat hmmm, Looks like you're a js expert, I have a question, what are atomic processes in javascript, I don't get them?
    and somewhere I had seen that they can be used to make an sleep function to stop the hole thread.
  • 1
    @b3b3 do tags do anything on devrant anyway? except maybe classifying something as rant or not rant?
  • 2
    I know how this feels. We had a problem where the *landing page* for our app took 18s to load, After much optimization I took it down to 6... Its not great but you have to understand thing shit was in development for over 6 years and the client is an idiot
  • 1
    @parsadev I'm not actually a JS expert, lol
    What do you mean with 'atomic processes' I can't seem to find much about that
  • 2
    This isn’t optimization. Something was obviously broken/shit and somebody fixed it.
Add Comment