WeakMaps - HTTP203

  Рет қаралды 19,888

Chrome for Developers

Chrome for Developers

Күн бұрын

Пікірлер: 25
@jurgentreep
@jurgentreep 7 жыл бұрын
Jake with the
@jakearchibald
@jakearchibald 7 жыл бұрын
Jurgen Treep genuinely one of my favourite t-shirts. Big fan of the work those folks do.
@jurgentreep
@jurgentreep 7 жыл бұрын
I should probably have said smile since I feel the same way.
@wmhilton-old
@wmhilton-old 7 жыл бұрын
I thought WeakMaps worked exactly like Surma did! I'm so enlightened. I feel like I'm at the right level to really enjoy/benefit from these discussions. Thanks so much for this series.
@victornpb
@victornpb 7 жыл бұрын
I had an algorithm that recursively traverse a cyclic object, so I had to keep track of visited objects, I used to push it to an array, then check visitedNodes.indexOf(obj) but I can just replace replaced it with a set. I had no reason to use the WeakSet per se because I'm not leaking memory, but @bmeurer at V8 said it is cheaper because It doesn't have to keep iteration order. Another use case is for implementing event buses, that doesn't leak memory when the handler goes out of scope.
@jakearchibald
@jakearchibald 7 жыл бұрын
I think I wrote a very similar piece of code last week - cloning an object with circular references. I used a WeakMap to track cloned objects.
@victornpb
@victornpb 7 жыл бұрын
Jake Archibald I also ended up using weakmap because I also hold some metadata of each node
@kamoroso94
@kamoroso94 6 жыл бұрын
This was really helpful for me to figure out why one would need to use a WeakMap or WeakSet for anything.
@MinusTechTips
@MinusTechTips 6 жыл бұрын
i love how they are freely referencing facebook and mozilla and their products. *ehm microsoft ehm*
@code-wiki8588
@code-wiki8588 6 жыл бұрын
Hey guys, Can u guide me to a webpage or a blog where i can learn more about how to efficiently use javascript for memory management in v8.
@aammssaamm
@aammssaamm 5 жыл бұрын
google.com ? :)
@ChunkyChest
@ChunkyChest 7 жыл бұрын
so, do you know...... no ... good, next topic
@omri9325
@omri9325 7 жыл бұрын
You guys are talking a bit unclearly, could you add subtitles or something? I really had hard time hearing/understanding what you are saying.
@dassurma
@dassurma 7 жыл бұрын
Sorry for our mumbling! Subtitles are being worked on as we speak, they usually show up within 1 or 2 days :)
@omri9325
@omri9325 7 жыл бұрын
Much appreciated!
@aammssaamm
@aammssaamm 5 жыл бұрын
Your understanding is clearly not the focus. They are just having fun without realizing it may not be what people come here for. Sometimes it looks even rather disgusting than fun.
@joonae5113
@joonae5113 7 жыл бұрын
WeakMap working the other way around would solve the other (999/1000) usecases
@victornpb
@victornpb 7 жыл бұрын
It doesn't make sense for me
@arkadymagomedov1700
@arkadymagomedov1700 2 жыл бұрын
exactly!
@nigelmrodgers
@nigelmrodgers 4 жыл бұрын
huh?
@sfincione2000
@sfincione2000 7 жыл бұрын
It's quite funny to watch you guys pretend to not know this stuff =)
@CodingPhase
@CodingPhase 6 жыл бұрын
i don't understand what makes you think they don't know what they talking about? like you are in your moms basement they working for google... like stfu
@MinusTechTips
@MinusTechTips 6 жыл бұрын
wtf CodingPhase, did you even read the comment? quickly jump into keyboard warrior mode much?
@aammssaamm
@aammssaamm 5 жыл бұрын
@@CodingPhase When did a google's title become a guarantee of an expertise? I have same opinion on already more than one topic they discussed.
@Rebel101
@Rebel101 7 жыл бұрын
Nonsense!
Old vs New JavaScript - HTTP203
15:33
Chrome for Developers
Рет қаралды 41 М.
Class-based Tree Shaking - HTTP203
12:16
Chrome for Developers
Рет қаралды 26 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
Loop Tiling - HTTP 203
25:36
Chrome for Developers
Рет қаралды 28 М.
Web RTC - HTTP203
7:42
Chrome for Developers
Рет қаралды 14 М.
JavaScript for-loops are… complicated - HTTP203
14:17
Chrome for Developers
Рет қаралды 106 М.
The Power of JS Generators by Anjana Vakil
36:10
JSConf
Рет қаралды 170 М.
VDOM vs lit-html - HTTP203
8:04
Chrome for Developers
Рет қаралды 41 М.
Weak References, Reachability, WeakSets, and WeakMaps
15:54
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 4,1 М.
JavaScript Memory Leaks and How To Fix Them
14:58
Software Developer Diaries
Рет қаралды 31 М.
120fps - HTTP203
7:39
Chrome for Developers
Рет қаралды 16 М.
Polyfills - HTTP203
9:47
Chrome for Developers
Рет қаралды 21 М.
How TOR Works- Computerphile
14:19
Computerphile
Рет қаралды 1,7 МЛН
пранк: псих сбежал из дурдома
0:53
Анна Зинкина
Рет қаралды 1,7 МЛН
Таким раствором работать одно удовольствие
1:00
Профессия созидатели
Рет қаралды 954 М.
(✋❌)kageihina VS siajiwoo VS meosimmyyt VS oxzung#tiktok #shorts
0:12