WEBVTT

00:00.000 --> 00:10.000
Now let me quickly start this before something else happens.

00:10.000 --> 00:17.280
So for the record, apologies Stefan couldn't make it, so but instead because he fell sick ahead of

00:17.280 --> 00:23.280
forst him, which is the first, usually it's the other way around, so it's a recording

00:23.280 --> 00:28.280
and so for the radio, Stefan and Lova.

00:53.280 --> 01:03.280
So for the record, it's the other way around, and it's the other way around, and it's the other way around.

01:03.280 --> 01:13.280
It's the other way around, and it's the other way around, and it's the other way around, and it's the other way around.

01:13.280 --> 01:17.280
So that's the last piece.

01:17.280 --> 01:21.280
What doesn't work that nicely is that

01:21.280 --> 01:31.280
and scripting has this idea that if you block the browser main thread with your code, then some of the

01:31.280 --> 01:36.280
scripting simulation doesn't work well, so scripting tries to simulate for your

01:36.280 --> 01:37.280
example.

01:37.280 --> 01:42.280
It creates to create your scripts, but they don't work if you don't block the main thread for the

01:42.280 --> 01:48.280
browser, but usually all of the application code does run on the main thread, so this doesn't fit.

01:48.280 --> 01:57.280
So what scripting has there is a built-in switch to move all of the replication code off the main thread.

01:58.280 --> 02:04.280
So the main thread of the to do it, the work is supposed to do by a browser, then

02:04.280 --> 02:11.280
not get blocked by your application code, and there's some mechanisms that

02:11.280 --> 02:18.280
have scripted to make that work more or less, but apparently we had to hack a few places in the

02:18.280 --> 02:26.280
code to also adapt to that, because then can't do any more in your application code

02:26.280 --> 02:33.280
is accessed all the browser data like this, which I just went to object.

02:33.280 --> 02:42.280
So we had to hack a few places with a proxy over to the other thread to get that working

02:42.280 --> 02:51.280
well, and yeah, the more or less less it works, and the canvas is also transparency

02:51.280 --> 02:57.280
handed over by the script to the other thread to make that work.

02:57.280 --> 03:04.280
So a few hexons should find in the Q5 code, and all of this works.

03:04.280 --> 03:10.280
But Q5 is old by now, and Q6 is available for quite a while, and some of the things

03:10.280 --> 03:15.280
were even work way better, and know that if you use Q6 rather than Q5,

03:15.280 --> 03:20.280
like a copy paste is a place where they had many improvements at the time.

03:20.280 --> 03:25.280
You'll be nice and be close to Q5, Q6.

03:25.280 --> 03:34.280
But thanks of, I mean, changed massively in the Q2 code since then.

03:34.280 --> 03:41.280
This is a longer single canvas element, for example, but each window is its own canvas.

03:41.280 --> 03:47.280
So there is the script and hack of moving this one, canvas over to the additional

03:47.280 --> 03:50.280
proxy to pithread thread.

03:50.280 --> 03:56.280
Can't work anymore because we don't have a single canvas that we can move up

03:56.280 --> 04:06.280
front before we start up, we need to listen tap into the whatever in the canvas is generated

04:06.280 --> 04:10.280
on the fly by the Q4, we need to tap into that.

04:10.280 --> 04:16.280
And it says to the James window, data in all of that is now spread all over the place

04:16.280 --> 04:17.280
on the Q4 code.

04:17.280 --> 04:24.280
So instead of a handful of places that I want to change over, we need to change hundreds,

04:24.280 --> 04:25.280
thousands.

04:25.280 --> 04:26.280
I gave up.

04:26.280 --> 04:34.280
I asked on the Q8 list and they said, yes, sure, if you can get that work in a way that doesn't spoil

04:34.280 --> 04:39.280
the existing code and just add to that an additional option.

04:39.280 --> 04:41.280
Go ahead, send it to the page.

04:41.280 --> 04:43.280
But I see the way for that.

04:43.280 --> 04:45.280
So what was disappointed in thought?

04:45.280 --> 04:49.280
There's no way for ever to have flow further.

04:49.280 --> 04:50.280
Six.

04:50.280 --> 05:03.280
About that time, I discovered a new WebAssembly extension that allows to, without changing your

05:03.280 --> 05:08.280
button code at all, or is it plus plus code, without changing that having the illusion,

05:08.280 --> 05:19.280
that at some point in time you suspend your resin code, give access to the browser main

05:19.280 --> 05:23.280
loop again.

05:23.280 --> 05:29.280
And when that is done, go back into the exactly the place in your resin code you were

05:29.280 --> 05:34.280
in before.

05:34.280 --> 05:38.280
Now what it should use there for something else completely for the model dialogue issue.

05:38.280 --> 05:40.280
And there it works as well.

05:40.280 --> 05:41.280
Kind of well.

05:41.280 --> 05:48.280
But that also gave me an idea I could leverage this for my six problems.

05:48.280 --> 05:54.280
So what we have this, we have the main browser threat, the browser event loop, the Q2 event

05:54.280 --> 05:59.280
handling, the load event handling, and running all of the labor office code.

05:59.280 --> 06:05.280
We wanted it to originally, or what we do with Q5, this have the split between the browser

06:05.280 --> 06:07.280
and the Q2 event handling.

06:07.280 --> 06:12.280
If that overture a different threat, now let's see if that doesn't work anymore.

06:12.280 --> 06:13.280
So Q6.

06:13.280 --> 06:20.280
But what if we do that split not the head of the Q2 event handling, but head of the new

06:20.280 --> 06:21.280
event handling.

06:21.280 --> 06:31.280
By using this JSPI machinery to when the Q2 event handling sees the new event that it wants

06:31.280 --> 06:40.280
to hand over to the new office event handling, make it stop, make it proxy that event over

06:40.280 --> 06:46.280
to an additional threat, make it go back to the browser event loop, by the other threat

06:46.280 --> 06:50.280
is doing the new office work, and then that is done.

06:50.280 --> 06:55.280
Just go back into the Q2 event handling as if nothing had happened in between.

06:55.280 --> 07:02.280
And it starts off again from the place where it had been interrupted.

07:02.280 --> 07:06.280
And that works, and that works even quite well.

07:06.280 --> 07:11.280
And then because the new office code is already prepared to run on different threats,

07:11.280 --> 07:14.280
we even see outcome of this event.

07:14.280 --> 07:17.280
And most of the time expect to be run on the main threat.

07:17.280 --> 07:21.280
There is some places in Q2 that are picky about which they are on.

07:21.280 --> 07:28.280
So when we call into that, from all of this event, we need to make sure that we are on the right

07:28.280 --> 07:29.280
threat.

07:29.280 --> 07:31.280
There is some extraction there.

07:31.280 --> 07:34.280
And that takes lambda, and that's it.

07:34.280 --> 07:37.280
I don't want them to be the threat you are on.

07:37.280 --> 07:44.280
So for the general non-lover Q case, or proxy that over to the transcript and main threat,

07:44.280 --> 07:47.280
for all the main threat, for the lower case.

07:47.280 --> 07:51.280
And that's all of kind of works.

07:51.280 --> 07:56.280
And didn't need the Q2 to be modified at all, which is great.

07:56.280 --> 08:00.280
So I will see a variety of documents, even start out.

08:00.280 --> 08:07.280
Some places, the crashes, or various very mental codes still on my machine only,

08:07.280 --> 08:09.280
and then what happens to it.

08:09.280 --> 08:12.280
Yeah, but promising.

08:12.280 --> 08:19.280
And if you want to see at least the five codes in action, then you can try it out here.

08:19.280 --> 08:23.280
And always tell us thanks.

08:26.280 --> 08:28.280
Thank you.

