---
title: "Comment by VA on \"Browser Event loop: micro and macro tasks, call stack, render queue: layout, paint, composite\" | Hashnode"
description: "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 th"
url: "https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226/comment/6445d691994f853a1efeda15"
---

[Discussion](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226)

Comment [Browser Event loop: micro and macro tasks, call stack, render queue: layout, paint, composite](https://hashnode.com/posts/event-loop-and-render-queue/640dda1fbcc5b29f3eeaf226)

[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
