Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
WEBVTT
1
00:00:00.039 --> 00:00:04.920
I think as an industry we have
become little immune to this.
2
00:00:04.920 --> 00:00:08.950
Where everybody keeps claiming how
amazingly performant they are, but
3
00:00:08.950 --> 00:00:11.340
I think they're missing the wrong thing.
4
00:00:11.340 --> 00:00:15.448
If you look at these benchmarks, and
I'm sure you've seen this, right?
5
00:00:15.448 --> 00:00:21.545
They do things like, how long does it
take to render a thousand rows, right?
6
00:00:21.545 --> 00:00:24.126
Sure, it's a use case.
7
00:00:24.126 --> 00:00:26.919
But that's not the problem for
99% of the websites.
8
00:00:26.919 --> 00:00:30.956
None of the print sites are not slow
because they're trying to render 1000
9
00:00:30.956 --> 00:00:31.758
rows, right?
10
00:00:31.758 --> 00:00:34.282
And this benchmarks lie for
several reasons.
11
00:00:34.282 --> 00:00:37.436
First of all, well, not that they lie.
12
00:00:37.436 --> 00:00:40.019
They don't lie, I mean,
they show the truth here.
13
00:00:40.019 --> 00:00:45.307
They're just measuring the thing that
doesn't really necessarily matter.
14
00:00:45.307 --> 00:00:49.494
So the first problem I have is that
all of these benchmarks assume that
15
00:00:49.494 --> 00:00:52.249
JavaScript is already downloaded, right?
16
00:00:52.249 --> 00:00:54.535
Not the case for most sites.
17
00:00:54.535 --> 00:00:58.287
The second thing they assume is that
the jitter has already been warmed up.
18
00:00:58.287 --> 00:01:02.146
So what happens is, they run this
benchmark over and over and over again,
19
00:01:02.146 --> 00:01:06.147
and the first few runs get thrown away
because they're too unpredictable.
20
00:01:06.147 --> 00:01:10.027
The reason that they're unpredictable is
because the jitter is not ready, right?
21
00:01:10.027 --> 00:01:13.657
The jitter hasn't collected sufficient
amount of data about the runtime of
22
00:01:13.657 --> 00:01:15.027
the application to do this.
23
00:01:15.027 --> 00:01:19.379
Now, when you run a code in tight loop,
Jitter does all kinds of crazy things
24
00:01:19.379 --> 00:01:23.466
that are not a representative of
what actually happens in production.
25
00:01:23.466 --> 00:01:26.398
Everything from the fact that a tight loop
26
00:01:26.398 --> 00:01:31.109
will have really good caching in
terms of L2 cache inside the CPU.
27
00:01:31.109 --> 00:01:36.169
It will do really good caching
in the property lookup in
28
00:01:36.169 --> 00:01:41.899
the VM which is not true in
the actual application code, etc.
29
00:01:41.899 --> 00:01:46.872
So there's a whole bunch of reasons why
warmed up Jit is actually incorrect of
30
00:01:46.872 --> 00:01:49.856
the actual performance, and specifically,
31
00:01:49.856 --> 00:01:55.001
it's incorrect because when you navigate
to a page on a fresh page, no jitter.
32
00:01:55.001 --> 00:01:56.673
You are running in interpretive mode and
33
00:01:56.673 --> 00:01:58.651
everything is being
running interpretively.
34
00:01:58.651 --> 00:02:01.949
>> Sorry, when you say jitter,
that has different baggage for
35
00:02:01.949 --> 00:02:03.443
me based on my background.
36
00:02:03.443 --> 00:02:07.707
When I hear jitter, I think of
fluctuations in execution or latency time,
37
00:02:07.707 --> 00:02:12.192
but I think what you're really referring
to is the just-in-time compiler.
38
00:02:12.192 --> 00:02:16.424
>> Sort of yes, here jitter means
just-in-time compiler, right?
39
00:02:16.424 --> 00:02:17.425
So,
>> I just wanted to clarify.
40
00:02:17.425 --> 00:02:19.350
>> Yes, it's good clarification.
41
00:02:19.350 --> 00:02:24.967
So, JavaScript is a interpreted language,
right?
42
00:02:24.967 --> 00:02:29.205
That can be compiled down to assembly.
43
00:02:29.205 --> 00:02:32.357
And that's the job of the Jitter,
to compile it down.
44
00:02:32.357 --> 00:02:35.459
But it turns out it's actually
extremely difficult to compile it down.
45
00:02:35.459 --> 00:02:39.984
And so, what happens in practice is that
the Jitter collects information about what
46
00:02:39.984 --> 00:02:42.483
it thinks your JavaScript
is actually doing.
47
00:02:42.483 --> 00:02:45.328
And based on that,
it takes a whole bunch of shortcuts.
48
00:02:45.328 --> 00:02:48.808
And then if you break one of these
assumptions that the Jitter makes,
49
00:02:48.808 --> 00:02:51.148
then the Jitter does
this thing called deopt.
50
00:02:51.148 --> 00:02:55.607
In other words, it says, yeah, I generated
all this code, I thought it was correct,
51
00:02:55.607 --> 00:02:58.374
but it turns out it's not,
I'm gonna throw it away.
52
00:02:58.374 --> 00:03:03.246
And so, all of these benchmarks that
you have here are my point is that
53
00:03:03.246 --> 00:03:05.101
they're kind of unfair.
54
00:03:05.101 --> 00:03:07.962
None of them are unfair, they're not
measuring the thing that you want.
55
00:03:07.962 --> 00:03:11.661
The problem of our industry is not that
the application is slow once it's up and
56
00:03:11.661 --> 00:03:15.149
running, although there are some
applications that have this problem.
57
00:03:15.149 --> 00:03:20.105
The problem with the industry
is just getting the application
58
00:03:20.105 --> 00:03:21.921
to run is the problem.
59
00:03:21.921 --> 00:03:23.579
Yeah, we talked about the Jitter,
60
00:03:23.579 --> 00:03:27.175
we talked about this totally focuses on
the dumb update and it ignores the fact
61
00:03:27.175 --> 00:03:30.798
that there is this thing called time
to interactive and total blocking time.
62
00:03:30.798 --> 00:03:35.909
And so, my point with these benchmarks
is that while they're important,
63
00:03:35.909 --> 00:03:38.424
they're not actually going after,
64
00:03:38.424 --> 00:03:43.291
an improvement in this benchmark here
will probably have no measurable
65
00:03:43.291 --> 00:03:47.613
improvement in your startup
performance of the application.
66
00:03:47.613 --> 00:03:51.003
So, people will oftentimes be like,
I should use framework x cuz it's twice as
67
00:03:51.003 --> 00:03:53.956
fast as the other thing, on my
application is gonna be twice as fast.
68
00:03:53.956 --> 00:03:56.410
You run it, you rebuild your
app in the new technology and
69
00:03:56.410 --> 00:03:59.036
you realize the application is
just as slow as it was before.
70
00:03:59.036 --> 00:04:03.733
There's no difference in
the thing that we care about.
71
00:04:03.733 --> 00:04:06.461
So, instead we did
a different benchmark here.
72
00:04:06.461 --> 00:04:08.165
So first,
we have this tool called Mitosis.
73
00:04:08.165 --> 00:04:12.902
Mitosis allows you to write kind of
pseudo code of an application and
74
00:04:12.902 --> 00:04:18.054
write it once, and Mitosis will
generate that code in idiomatic format,
75
00:04:18.054 --> 00:04:22.732
in angular, in react,
in whatever technology you want, right?
76
00:04:22.732 --> 00:04:26.026
And this allows you to really have
apples to apples to comparisons, right?
77
00:04:26.026 --> 00:04:29.148
Because a lot of the people that
wrote the movie app complained, well,
78
00:04:29.148 --> 00:04:31.814
there's actually two different
versions of the movie app.
79
00:04:31.814 --> 00:04:34.122
Ours does log in,
yours doesn't do log in, or whatever.
80
00:04:34.122 --> 00:04:38.575
It's all fair points and so
with Mitosis you can actually
81
00:04:38.575 --> 00:04:43.420
literally build the same exact
app across the technologies.
82
00:04:43.420 --> 00:04:47.236
And the thing to kind of compare
here is time to interactive, right?
83
00:04:47.236 --> 00:04:52.264
This is the blue line and
the total amount of JavaScript.
84
00:04:52.264 --> 00:04:55.451
And you can see is that as the total
amount of JavaScript goes up,
85
00:04:55.451 --> 00:04:57.349
the blue line goes up as well, right?
86
00:04:57.349 --> 00:05:02.661
And again, it totally makes sense because
what we're talking about here is,
87
00:05:02.661 --> 00:05:07.182
the way hydration works is it
eagerly executes your application.
88
00:05:07.182 --> 00:05:09.616
The more application you have,
the longer it takes, right?
89
00:05:09.616 --> 00:05:13.781
So, the more JavaScript you ship,
the longer the startup is gonna be.
90
00:05:13.781 --> 00:05:15.454
It's as simple as that.
91
00:05:15.454 --> 00:05:17.730
Figure out a way not to ship JavaScript,
your startup will be fine.
8460
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.