Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console.time almost always shows 0ms in CodeSandbox console - but real results are available in the browser's console #5077

Open
3 tasks done
Nantris opened this issue Nov 2, 2020 · 13 comments

Comments

@Nantris
Copy link

Nantris commented Nov 2, 2020

🐛 bug report

Preflight Checklist

  • I have read the
    Contributing Guidelines
    for this project.
  • I agree to follow the
    Code of Conduct
    that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

I'm doing some benchmarking and I noticed that when dealing with times like 24000ms, instead CodeSandbox shows 0ms, or in some cases 1ms.

image

To Reproduce

Link to sandbox: https://codesandbox.io/s/infallible-tdd-ex27s?file=/src/index.js

Your Environment

Software Name/Version
Сodesandbox
Browser Firefox 82
Operating System Windows 7
@sannek
Copy link
Contributor

sannek commented Nov 3, 2020

Thanks for your bug report. I can indeed reproduce this. We're going to investigate, and will get back to you.

@SaraVieira
Copy link
Contributor

Seems to be an issue with Console Feed in Firefox, trying to figure this out with Sam that made console-feed

@Nantris
Copy link
Author

Nantris commented Nov 10, 2020

@SaraVieira @sannek actually the issue exists in Chrome too. Although the output in Chrome differs from that in Firefox, neither matches the output in the console.

@SaraVieira
Copy link
Contributor

I noticed but honestly also not fully sure how close you can even get when its a console emulation 🤔

@Nantris
Copy link
Author

Nantris commented Nov 11, 2020

@SaraVieira what stood out to me was the way the outputs differ.

In Chrome the emulated console shows: merge: 0.3850000211969018ms

But in the real console it shows merge: 25476.956298828125 ms

Maybe it's not at all surprising since Chrome natively includes fractional milliseconds and Firefox does not - but it struck me as odd since I figured whatever logic caused this issue would cause the same issue in Chrome.

@SaraVieira
Copy link
Contributor

Ever since I started working on CodeSandbox I found out a lot of things come from the underlying architecture of the browser and even sometimes how that browser would even interact with the OS underneath.

It is a weird one tho and I will keep you updated

@github-actions
Copy link

This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.

@github-actions github-actions bot added the stale label Feb 15, 2021
@Nantris
Copy link
Author

Nantris commented Feb 15, 2021

@SaraVieira @sannek, is this still an issue? The repro I shared no longer seems to run for me so I can't check in a flash.

@github-actions github-actions bot removed the stale label Feb 16, 2021
@github-actions
Copy link

This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.

@github-actions github-actions bot added the stale label May 18, 2021
@Nantris
Copy link
Author

Nantris commented May 18, 2021

Can't readily test to see if this is stale because the repro sandbox seems to no longer function.

"window.mergeTest is not a function"

I haven't made any changes since sharing I'm 99.999% sure. Any thoughts here?

@github-actions github-actions bot removed the stale label May 19, 2021
@lbogdan
Copy link
Contributor

lbogdan commented May 24, 2021

I can still reproduce this in the linked sandbox, will open an issue against console-feed .

@github-actions
Copy link

This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.

@github-actions github-actions bot added the stale label Aug 23, 2021
@Nantris
Copy link
Author

Nantris commented Aug 23, 2021

Not stale, but issue is in third-party dependency I think, as per @lbogdan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants