---
title: "Discussion on \"Browser Event loop: micro and macro tasks, call stack, render queue: layout, paint, composite\" | Hashnode"
description: "Discussion on \"Browser Event loop: micro and macro tasks, call stack, render queue: layout, paint, composite\". Browser Event loop: micro and macro tasks, call stack, render queue: layout, paint, composite"
url: "https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Browser Event loop: micro and macro tasks, call stack, render queue: layout, paint, composite](https://blog.xnim.me/event-loop-and-render-queue?utm_source=hashnode&utm_medium=feed)

Browser Event loop: micro and macro tasks, call stack, render queue: layout, paint, composite

Mar 12, 2023 · 13 min read · blog.xnim.me  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#event-loop](https://hashnode.com/tag/event-loop)
-   [#repaint-and-reflow](https://hashnode.com/tag/repaint-and-reflow)
-   [#layout](https://hashnode.com/tag/layout)
-   [#render-queue](https://hashnode.com/tag/render-queue)

## Written by

[Nik](https://hashnode.com/@xnim)

@xnim · London, UK

  
[View profile](https://hashnode.com/@xnim)

SWE@Meta, Whatsapp

Software engineer @Meta, WhatsApp, building secure, e2ee messaging experience for users. ex-HH.ru ex-Program committee member HolyJS conference

## Responses 10

Markdown supported · ⌘↵ to post

[Gerald Baldie](https://hashnode.com/@geraldbaldie)

[Feb 25, 2024](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/65dbbdf7e92d14356c00cd42)

Buy High Quality Counterfeit Money/Buy cloned cards online/Buy PayPal Top-up/WhatsApp…..+49 1521 9324117/Telegram: @matrixccc [t.me/thematrixshops/https://thematrixcartel.store](https://t.me/thematrixshops/https://thematrixcartel.store/)

Fake Euro notes and Cloned credit cards available for sale. We also do PayPal transfer Topups. Tap in for more information on our services. Telegram username: @matrixccc [t.me/thematrixshops](https://t.me/thematrixshops) [thematrixcartel.store](https://thematrixcartel.store/) Whatsapp +49 1521 9324117 Ψεύτικα χαρτονομίσματα ευρώ και κλωνοποιημένες κάρτες προς πώληση Ψεύτικα χαρτονομίσματα ευρώ και κλωνοποιημένες πιστωτικές κάρτες προς πώληση. Κάνουμε επίσης PayPal μεταφορά Topups. Πατήστε για περισσότερες πληροφορίες σχετικά με τις υπηρεσίες μας. Όνομα χρήστη Telegram: @matrixccc [t.me/thematrixshops](https://t.me/thematrixshops) Κανάλι Whatsapp +49 1521 9324117

[thematrixcartel.store](https://thematrixcartel.store/)

Buy counterfeit money Grade AAA Quality Counterfeit Money For Sale Buy Greece (EUR €) The Matrix Cartel [thematrixcartel.store](https://thematrixcartel.store/)

WhatsApp…..+49 1521 9324117

Buy 100% undetectable counterfeit banknotes with different serial numbers

Buy fakes (Greece, Italy, Portugal, Germany, Belgium, Switzerland, Ireland)

Buy fake banknotes online in Athens

Buy high quality euro banknotes

Where can you buy fake banknotes online in Athens?

WhatsApp….. +49 1521 9324117

Telegram… @matrixccc [t.me/thematrixshops](https://t.me/thematrixshops)

WhatsApp…..+49 1521 9324117

[thematrixcartel.store](https://thematrixcartel.store/) WhatsApp….. +49 1521 9324117

buy fake bills,

Money is an essential commodity that allows us to live our lives in freedom. Beyond basic needs, it also helps us achieve our goals related to family, education and healthcare.

[thematrixcartel.store](https://thematrixcartel.store/)

Looking for a reliable partner for purchasing top-notch multipurpose counterfeit money online? Look no further We stand as the premier supplier of counterfeit bills in various currencies.

WhatsApp…..+49 1521 9324117

Telegram… @matrixccc [t.me/thematrixshops](https://t.me/thematrixshops)

WhatsApp…..+49 1521 9324117

[thematrixcartel.store](https://thematrixcartel.store/) Best Fake Money Store

Detection of counterfeit money WhatsApp…..+49 1521 9324117 [t.me/thematrixshops](https://t.me/thematrixshops)

Fake currency identification

Buy High Quality Counterfeit Money

Best quality Undetected Banknote...

Buy Paypal Top Up Balance Worldwide Fast Delivery buy balance paypal with crypto

Buy Paypal Top Up Balance

Quick and Secure Online Top-ups

Benefit from instant email delivery and immediately utilize your PayPal top-up card.

Counterfeit Money Online - Banks Bills

Grade AAA Quality Counterfeit Money For Sale

[t.me/thematrixshops](https://t.me/thematrixshops)

How to recognize counterfeit money

Protection against counterfeit money

Tips for recognizing counterfeit money

Counterfeit money versus real money

Counterfeit prevention

We're rocking the scene as top-notch suppliers of fake money worldwide. Now, don't be fooled – it's just paper, but let's face it, our lives pretty much revolve around the stuff. From ancient coins to modern bills, people have been dealing with money forever, and yep, there have always been some fakes floating around.

Counterfeit money awareness

Counterfeit money detection technology

Penalties for counterfeit money

Consequences of counterfeit money

Fake statistics

Counterfeit money in circulation

Traceability of counterfeit money.

Counterfeit money

Fake invoices

Counterfeit money

[t.me/thematrixshops](https://t.me/thematrixshops)

Counterfeit banknotes

Reproduction money

Counterfeit money

fake

Counterfeit money

Double money WhatsApp…..+49 1521 9324117

Counterfeit money

Counterfeits

Counterfeit detection

Counterfeit banknotes.

Counterfeit money market

Counterfeit money production

Delivery of counterfeit money

Counterfeit money detector

Counterfeit money scanner

Undetected Bank Notes

Pre-tested Currencies

We print high quality counterfeit banknotes from different countries.

Buy 0 undetectable counterfeit money.

Undetectable Currencies

Printing techniques for counterfeit money

Anti-counterfeiting laws

top-quality grade AA counterfeits, including USA dollars, Great Britain Pounds, Euro, Malaysian Ringgit, and Australian and Canadian dollars.

Penalties for counterfeit money

Consequences of counterfeit money

Investigations into counterfeit money

[t.me/thematrixshops](https://t.me/thematrixshops)

WhatsApp…..WhatsApp…..+49 1521 9324117

Telegram… @matrixccc

[thematrixcartel.store](https://thematrixcartel.store/)

Buy Fake Banknotes Buy Fake Banknotes in Greece where to buy fake notes in Greece where to buy counterfeit money in Greece where to buy counterfeit notes in Greece Counterfeit notes for sale Greece buy counterfeit notes in Greece Buy fake notes in Greece Buy fake euro notes in Greece where to buy fake notes in Athens where to buy counterfeit money in Athens where to buy counterfeit notes in Athens Counterfeit notes for sale Athens buy counterfeit notes in Athens Buy fake notes in Athens Buy fake euro notes in Athens

[t.me/thematrixshops](https://t.me/thematrixshops)

WhatsApp…..+49 1521 9324117

[thematrixcartel.store](https://thematrixcartel.store/)

πού να αγοράσετε πλαστά χαρτονομίσματα στην Ελλάδα πού να αγοράσετε πλαστά χαρτονομίσματα στην Ελλάδα πού να αγοράσετε πλαστά χαρτονομίσματα στην Ελλάδα πλαστά χαρτονομίσματα προς πώληση στην Ελλάδα αγορά πλαστών χαρτονομισμάτων στην Ελλάδα Αγοράστε πλαστά χαρτονομίσματα στην Ελλάδα Αγορά ψεύτικων χαρτονομισμάτων ευρώ στην Ελλάδα πού να αγοράσετε πλαστά χαρτονομίσματα στην Αθήνα πού να αγοράσετε πλαστά χαρτονομίσματα στην Αθήνα πού να αγοράσετε πλαστά χαρτονομίσματα στην Αθήνα πλαστά χαρτονομίσματα προς πώληση Αθήνα αγορά πλαστών χαρτονομισμάτων στην Αθήνα Αγοράστε πλαστά χαρτονομίσματα στην Αθήνα Αγοράστε πλαστά χαρτονομίσματα ευρώ στην Αθήνα

#fakenotes #counterfeit #counterfeits #counterfeiter #euro #banknotes #greece #greecegr #athens

[thematrixcartel.store](https://thematrixcartel.store/)

WhatsApp…..+49 1521 9324117 buy counterfeit money online/ Buy clone credit card with balance

[thematrixcartel.store](https://thematrixcartel.store/)

"Where to Buy Clone Cards in Athens, Greece" "Buy clone cards on Greece reddit" "Purchasing Cloned Cards" "Clone Cards" "Clone Maps in Greece" "Can ATMs detect cloned cards" "Is it possible to track cloned cards" "Can a cloned card be used at an ATM" "Using cloned credit cards" "Are clone cards real" "Can a cloned card be used on reddit atm" "Buy Clone Credit Cards Online" "Clone Card Prices" order your cloned cards today for quality and service. "How criminals clone bank cards" "Clone Debit Card" "Map Cloning Against Peeling" "Can someone duplicate my debit card" "Duplicate Debit Card" "Cloning bank accounts" [t.me/thematrixshops](https://t.me/thematrixshops) clone credit card for sale "Buy clone cards online in Greece" "How to Buy Stolen Credit Cards on the Dark Web" "Where can I sell credit card numbers" "Websites to Buy Stolen Credit Cards" "Can a cloned card be used at an ATM" our cloned credit cards undergo meticulous processing "Dark Web Credit Card Numbers" Buy cloned cards online "Are clone cards real" "Buy Credit Card Numbers with CVV" "Using cloned credit cards" "Can ATMs detect cloned cards" "Purchasing Stolen Credit Cards on the Dark Web Reddit" "How to Use Dark Web Credit Cards" "How to cash out cloned cards" "Is it possible to track cloned cards" "How to buy cards on the dark web" "Buy cloned cards online in new t-shirt" "Where to Buy Clone Cards in Greece" "Buy Cloned Cards Online in Greece" "Buy Athens Clone Cards Online" "Buy Clone Cards Online in athens" they sell cloned credit cards credit card sell stolen card can credit cards be cloned Can chip credit cards be cloned? how credit cards are cloned can someone clone my credit card sell stolen credit cards stolen credit card information for sale sell stolen credit card numbers using cloned credit cards cloned credit cards a deep web of cloned credit cards where to buy cloned cards are the cloned cards real

[t.me/thematrixshops](https://t.me/thematrixshops)

WhatsApp…..+49 1521 9324117

[thematrixcartel.store](https://thematrixcartel.store/)

are cloned cards legit are the cloned cards real where to buy credit card numbers cloned cards are illegal sale of cloned cards +clone +cards +for sale +cloned +credit +cards +for sale +what +is +clone +maps +which +are +cloned +maps +buy +cloned +credit +cards +buy +cloned +credit +cards +online +buy +clone +cards +online +now +buy +cloned +credit cards +free +cloned +credit +cards +what +are +cloned +credit cards +how +to +clone +maps +how +maps are +cloned +cloned +cards +for +sale +cloned +ATM +cards +on sale +buy +cloned +cards +online

[t.me/thematrixshops](https://t.me/thematrixshops)

WhatsApp…..+49 1521 9324117

[thematrixcartel.store](https://thematrixcartel.store/)

Paypal flipping PayPal is only an online transfer. We make individual PayPal account to individual PayPal account only. It means that you will get a transfer from another person. Such transfers are not checked and can not be canceled. We use stolen PP accs for the transfers.

WE OFFER DELIVERIES WORLDWIDE We are very discrete and fast in all level of our transactions. So, you can placed your order and get the best flipping services with us.

[t.me/thematrixshops](https://t.me/thematrixshops)

WhatsApp…..+49 1521 9324117

[thematrixcartel.store](https://thematrixcartel.store/)

[Abdossalam Aboasha](https://hashnode.com/@Gharian)

[Feb 11, 2024](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/65c839739274e9a03c13c5ad)

i used hashnode on coinbase wallet to connect to Tether wallet now i am getting SSL error can you help how to fix it. THanks

[Kaushal Joshi](https://hashnode.com/@kaushal-joshi)

[Feb 1, 2024](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/65bb968962d3db2598c41903)

Wow! Such a detailed blog. Thanks for writing :))

[Praveen V](https://hashnode.com/@praveen20)

[Jan 12, 2024](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/65a0dfe325e700643df2b228)

[devtohash.hashnode.dev/javascript-vs-typescript-c…](https://devtohash.hashnode.dev/javascript-vs-typescript-comparison-analysis)

[Praveen V](https://hashnode.com/@praveen20)

[Jan 12, 2024](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/65a0dfe325e700643df2b228#reply-65a0e00d125c47a5a03b8048)

Blog with Code

[Jacob](https://hashnode.com/@mammoth)

[Jan 11, 2024](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/659f9c89d842226d80922480)

Great article!! I'd like to translate it and share it on another platform, with the original link included. May I have your permission?

[Nik](https://hashnode.com/@xnim)

[Jan 29, 2024](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/659f9c89d842226d80922480#reply-65b821347d8b3001fecbabcc)

Hey Jacob, sorry, missed your comment.

yes, sure, go ahead

[Nguyen Tan](https://hashnode.com/@nguyentan2808)

[Jan 10, 2024](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/659e085067939dc421cceedc)

Great article with a super detailed explanation. I have to sign up to send a like to your content. :))

[May WaM](https://hashnode.com/@Kaiido)

[Sep 4, 2023](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/64f5247eb2147985ab4ee5b9)

Didn't read it through yet, but someone gave me the link to #heading-what-are-microtasks and the first affirmation in this paragraph is not correct, you can queue microtasks yourself with the queueMicrotask method, and specs can queue microtasks as they will, for instance HTML does queue a microtask to update the image data of <img>, so that you can set the .crossOrigin or loading attributes after the src one, in the same task, without triggering useless network requests.

[Zhenyu](https://hashnode.com/@joy598)

[Jun 30, 2023](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/649eae262a0936ab01ee2424)

Thanks for this great article! Can I ask a question? if TaskQueue only has TaskA takes 4ms, TaskA call setTimeout(FuncA, 0), next step is RenderQueue or FuncA?

[Nik](https://hashnode.com/@xnim)

[Jan 29, 2024](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/649eae262a0936ab01ee2424#reply-65b8218dd3c9bd8cdf6afe3d)

The correct answer is that behaviour is not determined. (as we should know when render happens the last time).

e.g. if the render happens right before TaskA, then there is a high probability, that FuncA will be executed before.

[VA](https://hashnode.com/@vietanhlehuu)

[Apr 24, 2023](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/6445d691994f853a1efeda15)

Thanks for this comprehensive article! Can I ask a question? If we mutate and read the DOM separately twice like your example, does it pause the task and run the layout step before give the result back?

[Nik](https://hashnode.com/@xnim)

[Apr 28, 2023](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/6445d691994f853a1efeda15#reply-644bb157edbb52981df7d0f2)

It might not run "The whole layout", as layout is quite complicated process which has many steps, it worth to make a separate article.

What can happen: the layout of the changes code has done + recalculate all "shifting" in the elements.

The simplest way to see it:

1.  Open you browser dev tools
2.  Go to Performance Tab
3.  Start recording
4.  Open a website (or make some actions on opened page)
5.  Stop recording
6.  Open "Event log"
7.  Scroll to function call which makes Layerise step. Example: ![Example](https://cdn.hashnode.com/res/hashnode/image/upload/v1682682177682/32d9eb3a-3941-4754-8253-3b273b4f3631.png)
    
8.  Select it on a timeframe to see the calculations
    

[VA](https://hashnode.com/@vietanhlehuu)

[Apr 28, 2023](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/6445d691994f853a1efeda15#reply-644bd494edbb52981df7d688)

[Nik](https://hashnode.com/@xnim) Thanks for your detailed reply! Look forward to your upcoming articles about those topics like this

[Natalia Davydova](https://hashnode.com/@natDavydova)

[Apr 17, 2023](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/643d9131f6c4d2d29899728d)

Thank you for this great article!

The only question about this part: "So, if you have transform: translateZ(0) in your codebase to move the render on a GPU, it doesn't work in such a way. It's a misconception."

Could you please share the source you've get the info?

In lots of articles is told that this 'hack' really improves optimizations.

[Nik](https://hashnode.com/@xnim)

[Apr 17, 2023](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/643d9131f6c4d2d29899728d#reply-643da26cb7aa20e0b08c4b1e)

translateZ(0) doesn't move your render to GPU. The whole "composite" layer can be executed on GPU by modern browsers.

The reason, why translateZ(0) is usually recommended to resolve some rendering issues, is because it "moves" your elements to a separate layer in browser. You can see the layers model in your browser by opening "Layers" tab:

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1681760789153/a13aa3d0-cb66-4c57-89c4-d41f48eda687.png)

Even though this method solves some rendering issues, many Layers might cause performance issues in your app.

If you want to learn more here is an article (rus) about that: [habr.com/en/companies/odnoklassniki/articles/3139…](https://habr.com/en/companies/odnoklassniki/articles/313978/)

[Natalia Davydova](https://hashnode.com/@natDavydova)

[Apr 17, 2023](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/643d9131f6c4d2d29899728d#reply-643da514b7aa20e0b08c4b71)

[Nik](https://hashnode.com/@xnim) Thank you very much for the explanation and the article!

[Sandeep Panda](https://hashnode.com/@sandeep)

[Mar 13, 2023](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/640ebb30541e68535cd98d0b)

Great content. Welcome to Hashnode! :)

[Nik](https://hashnode.com/@xnim)

[Mar 12, 2023](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/640de91f1f113f512807b04f)

Updated images in the article. By accident got them removed before publishing the article 🙈
