Greetings. Using Uncategorized since it’s not really an issue. I just want to know how is it even possible.
OS: Funtoo Linux 1.4, all latest packages.
Chromium: 80.0.3987.149 (Official Build) unknown (64-bit)
- Installed Brave with the package manager.
- Opened devtools (Ctrl+Shift+I) and run the script.
- Enabled Profiler.
- Run the script again.
- Uploaded the code to CodePEN.
- Run the script on CodePEN with and without the profiler.
The (milliseconds, a bit rounded up) results are:
Also, if I put the CodePEN in full-page mode the results become the same as with local file. Having devtools opened without running the profiler doesn’t affect it at all so I don’t think it’s because of window size. I literally just click Record before starting the script and it becomes an order of magnitude faster. Then I disable the profiler and it becomes slow again. All without changing the window size.
If you want to test it, click the lower frame’s upper link to run the script. It does nothing but modify DOM a little bit once in a few thousand iterations, otherwise it’s busy-wait.
All of the code is generated, not hand-written.