perflink icon indicating copy to clipboard operation
perflink copied to clipboard

testing DOM performance.

Open trusktr opened this issue 5 years ago • 3 comments

I wanted to test DOM performance, for example.

But window or Element are not defined. I'm guessing it's running the code in a worker. Would be sweet if we had an option to run in an iframe instead.

trusktr avatar Aug 27 '20 07:08 trusktr

You are correct about the workers.. this was quite the oversight when going from V1 fo V2 😅

Emulating a thread via an iframe seems like a pretty good middle ground between running on the main thread (V1) and running in workers (V2).

There really isn't that much code in this repo (albeit perhaps not all that well organised) and I am not that precious about how things are wired up. So if you would like to take a stab at this then I'd be happy to review a PR.

Are you imagining an iframe/worker toggle switch somewhere?

lukejacksonn avatar Aug 27 '20 17:08 lukejacksonn

Yeah, perhaps a toggle would do it. let me see if I can circle back to this.

trusktr avatar Sep 01 '20 05:09 trusktr

Awesome! You could probably get most of the code from old (pre V2) commits in the repo.

lukejacksonn avatar Sep 01 '20 13:09 lukejacksonn