For example 1-2 it seems that the objects didn't go to finallzier queue not becasue of manual disposing but because of SuppressFinalizer(this) call tho
I like the JetBrains tools but what occurred around 31:30 is a relatively common experience I have. Currently I've disabled it until I figure out what settings I can run it on to prevent hanging up or crashing VS2019.
Well, Visual studio always blames third party plugins if it crashes or hangs. Don’t trust visual studio, try enable those tools and be productive. Everyone know that the visual studio itself is a culprit. - Happy coding!
1) The code on the 43:30 does not show pros of the strings interning: "stringList" is populated with "url" reference - all the list entries point to the same object, but not because of string.Intern - the reference is the same. I think the "url" variable declaration should be inside the loop. 2) LOH defragmentation and GC are expensive because large memory blocks copying is expensive. Not because "it would take a lot of time to scan them" and not because "these objects have more properties or fields in them". Actually, common LOH resident is an array. And in does not have a lot of "fields and properties" in it.
This particular example is perhaps a bit light on showing string interning in action, but the idea should hold: string.Intern() interns the string and returns a reference, instead of storing it over and over again in that list. Better example would probably have been loading string data from somewhere and interning that instead. On LOH: thanks! Will explain that next time I give this talk. Appreciate the input, thanks!
1) In the example nothing changes even if I replace var url = string.Intern("...") with var url = "...". The list still will be populated with reference on the same object, not 10K different objects.
This would change things: var rootUrl = "someurl"; var list = new List(); for (int i = 0; i < 100000; i++) { list.Add(string.Intern(rootUrl + "/")); } This would add the same reference t the list over and over again, even though teh string is being created dynamically.
ok, so @JetBrainsTV when people show code on screen tell them to close off *anything and everything* that is irrelevant. 33:15 34.7 % of the screen is code. I was generous and included the line numbers area. In other words, _two thirds_ of the screen is _wasted_ // Load object from the stream ... what is this?
Thank you very much for this one! I really love in-depth talks like these, pretty interesting!
Thanks!
Amazing education. Can you describe the poignant differences with clrMD with Process Explorer?
Thank you! Clear and thorough.
Very interesting! I love your quote...
For example 1-2 it seems that the objects didn't go to finallzier queue not becasue of manual disposing but because of SuppressFinalizer(this) call tho
Thank you for deep explanation.
Greath video ! easy to understand and helpfull. Thank you
Really good explanation. Thankyou.
You are welcome!
I like the JetBrains tools but what occurred around 31:30 is a relatively common experience I have. Currently I've disabled it until I figure out what settings I can run it on to prevent hanging up or crashing VS2019.
Well, Visual studio always blames third party plugins if it crashes or hangs. Don’t trust visual studio, try enable those tools and be productive.
Everyone know that the visual studio itself is a culprit.
- Happy coding!
1) The code on the 43:30 does not show pros of the strings interning: "stringList" is populated with "url" reference - all the list entries point to the same object, but not because of string.Intern - the reference is the same. I think the "url" variable declaration should be inside the loop.
2) LOH defragmentation and GC are expensive because large memory blocks copying is expensive. Not because "it would take a lot of time to scan them" and not because "these objects have more properties or fields in them". Actually, common LOH resident is an array. And in does not have a lot of "fields and properties" in it.
This particular example is perhaps a bit light on showing string interning in action, but the idea should hold: string.Intern() interns the string and returns a reference, instead of storing it over and over again in that list. Better example would probably have been loading string data from somewhere and interning that instead.
On LOH: thanks! Will explain that next time I give this talk.
Appreciate the input, thanks!
1) In the example nothing changes even if I replace var url = string.Intern("...") with var url = "...". The list still will be populated with reference on the same object, not 10K different objects.
This would change things:
var rootUrl = "someurl";
var list = new List();
for (int i = 0; i < 100000; i++) {
list.Add(string.Intern(rootUrl + "/"));
}
This would add the same reference t the list over and over again, even though teh string is being created dynamically.
Yes, this one does show the purpose of strings interning.
Thank you.
Great video
FYI. My VS 2017 also crashed when I opened the beers.json file.
It doesn't seem happy opening 50 MB JSON files...
very informative
ok, so @JetBrainsTV
when people show code on screen
tell them to close off *anything and everything* that is irrelevant.
33:15
34.7 % of the screen is code. I was generous and included the line numbers area.
In other words, _two thirds_ of the screen is _wasted_
// Load object from the stream
... what is this?
TripDownMemoryLane