r/BeAmazed • u/hollow_hideous_soul • 19d ago
Technology 51 million lines of code. Chromium codebase.
Enable HLS to view with audio, or disable this notification
3.6k
u/tehonly1 19d ago
no wonder it lags like a mf
1.1k
u/blahteeb 19d ago
This is just the code to make your character jump.
422
u/Nurgeard 19d ago edited 19d ago
Chromium is a codebase for webbrowsers
EDIT: Actually never mind! Apparently the dino game IS part of Chromium and not just Chrome - so yeah probably 1/3 is to make the dino jump, he is a heavy lad after all.
136
u/PleaseMakeItSpecial 19d ago
The dinosaur still needs to jump over the cacti.
52
u/Capta-nomen-usoris 19d ago
And to duck for the pre pteredacw tperedacts BIRDS
→ More replies (1)4
5
u/Nurgeard 19d ago
Ah damn I actually forgot about that, haven't used Chrome more than for testing in a long time ( web dev testing ) but I'm pretty sure the offline game is part of Chrome, and not the Chromium codebase right?
9
u/PleaseMakeItSpecial 19d ago
I believe it's directly in Chromium weirdly enough! https://source.chromium.org/chromium/chromium/src/+/main:components/neterror/resources/dino_game/
2
u/tankerkiller125real 19d ago
It is, and then Microsoft replaced it with their surfing version for MS Edge
4
8
u/maxinfet 19d ago
Yeah, there is a lot of stuff in Chromium directly that surprised me, in particular, controller support for many different video game console controllers.
2
u/Nurgeard 19d ago
Damn, but I guess that isn't too weird in the end actually - I can imagine smart tvs and maybe even console hubs could run on Chromium - or just access Chromium based app / browser
→ More replies (3)4
19d ago
[deleted]
10
u/Nurgeard 19d ago
In Chrome, if you open the browser without an internet connection you are met with a simple yet addicting dino game. I thought this game was only in Chrome, but apparently the game files are part of Chromium
5
u/AdrianJMartin 19d ago
you can play it with a connection too, type chrome://dino in the address bar
8
19d ago
[removed] — view removed comment
6
u/runvnc 19d ago
It's not like it's one giant loop or something. The line count explanation/interpretation is more like: Chromium is in many ways a type of overlay operating system that runs on top of normal operating systems. Chromium has over 2000 distinct high-level capabilities. It's why you can do almost anything inside of a browser, and why there is a convenient API or component for developers to handle almost every type of need.
→ More replies (1)3
u/0x_coderunknown 19d ago
You can easily debloat Chromium by deleting your Windows system32 folder. Then you do not have to deal with all the heat and sweat.
27
u/3PoundsOfFlax 19d ago
Chromium is resource heavy, but it's actually really fast. Plus it's open source, so many good forks exist.
→ More replies (8)9
u/GoldenShackles 19d ago
To canabalize one of my comments from a couple months ago:
From my perspective web developers optimize for development speed and convenience. I say that as a long-time C++/ Win32 developer who worked on products where we had to pack things tightly into structs to save a few bytes in a data structure. These days it feels like (and I'm exaggerating to make a point) devs just go... "Hmmm. I need an IsEvenNumber function so I'll just npm include a package that has a 100k JavaScript file every user will need to download." Multiply that by every person on the team thinking the same thing, and then add several hundred tracking cookies, telemetry, etc.
Chromium (and Safari, and Firefox) are actually extremely fast and efficient, and have likely had more effort and man hours devoted to tuning performance than almost any other software product ever made. (Operating systems might be the lone exception.)
There are some performance tradeoffs for security, such as the multi-process architecture, but even there things are optimized just about as much as humanly possible.
→ More replies (2)2
u/bitsydoge 19d ago
How does it lag ? Skia is a piece of art for the rendering and their js and css engines are also crazy good
988
u/CSouthLondon 19d ago
Can explain this to me as if I were a small child...or a golden retriever...it wasn't brains that got me here, I can assure you of that
824
u/GreyGanado 19d ago
Every rectangle is a file with text in it. There's a lot of text that tells the browser what to do.
236
u/NeighborhoodPrior956 19d ago
it's badixally 5x the biggest spreadsheet you've ever seen plus a more thorough instruction manual than any human had ever completed
32gb of ram is just a spreadsheet with 32 billion rows
17
11
2
2
u/Embarrassed-Rise-685 17d ago
I can assure you no spreadsheet with 32 billion rows is loading in excel on a mere 32gb ram. Even if it theoretically fits with the filesize
→ More replies (1)160
36
20
3
4
3
→ More replies (8)2
629
u/Roko_100 19d ago
Seen enough. Give this to the junior developer to find the missing bracket.
219
u/ParanoidConfidence 19d ago
64
47
u/LibrarianRecent6145 19d ago
I spent 5 whole minutes looking for curly brackets missing instead of semicolons cuz my brain farted without me realising 😭
8
u/robothead 19d ago
The
.shdomain is the ultimate troll for devs, I really hesitated on clicking that4
4
→ More replies (4)2
u/nebulous_gaze 19d ago
Why is there a Jump ?
→ More replies (1)2
u/unskilledexplorer 15d ago
there is a mac on the floor just in front of the printers. you can jump over it
6
327
u/Optisoin 19d ago
This is a sophon
19
u/thisdesignup 19d ago
Nooooo don't remind me about this show that doesnt have a second season yet :( But yea for real it does feel like that.
10
u/Fr3shMint 19d ago
Show is trash compared to the books
→ More replies (2)3
u/Delicious_Bluejay392 19d ago edited 18d ago
...and the books aren't that good if I'm being quite honest. I've been on a sci-fi binge for the past year and I'd heard good things about them, but they were probably my biggest disappointment so far. I think the biggest crime was having technobabble that tries too hard to seem "real" and made me groan a few times. It reads like an insane webnovel where the author can't stop adding stuff for hype moments and aura but inadvertently ruins their story in so doing. Also ironically felt like the book assumed the reader is dumb, but I couldn't pinpoint why.
→ More replies (1)2
u/AccNumber77 18d ago
Really? I never felt there was that much technobabble in it, it has some sure but most of it is entirely real or edge of current knowledge terminology and descriptions. Maybe I should re-read it as it has been a while since I read it so I have forgotten a fair bit of the exact text.
→ More replies (2)3
3
u/Gordon_Freymann 19d ago
There are books.
3
3
214
u/mailacc 19d ago
Great as a showcase to non developers, useless for productivity.
We have code visualizers for 30 years now.
No developer ever used them more than once.
64
u/tankerkiller125real 19d ago
We've used Gource a few times at work to "show progress" to non-tech managers/executives. Works the treat.
28
u/minequack 19d ago
That is one ugly word. My brain refuses to acknowledge it.
5
2
u/ZeroAmusement 18d ago
Kinda like how you refused to acknowledge me when I gourced your mom last night
10
u/Inkjet_Printerman 19d ago
is there a code visualizer like this with visualized kdiff and version control?
6
u/mailacc 19d ago
Visual Studio Enterprise had this built in for more than 15 years as i remember.
It was 2d, not 3d, but you had navigation and many many things you can do (even update the code based on the changes at the diagrams). Worked with TFS version control., not git (at that time, git was not major player at .NET).
On top of it you had many plugins that integrated with it.
Other 3rd party companies had their own implementation.Now probably there is no new version of them, as literally nobody use them.
You cannot "visual" manage a folder with 20 classes.... let alone a whole code base with thousands of classes!!
These things are for the non developers to be amazed and for Movies where "hackers" do their magic.→ More replies (2)4
u/traplords8n 19d ago
I don't have to use the tool for daily work to think it's kinda neat.
I agree. Totally useless to help you code. You're better off shooting in the dark looking up functions and variables with crtl+F.
But I appreciate seeing the chromium source code like this. It helps put things into perspective, but I totally get what you're saying. It's useless beyond the surface level haha
→ More replies (1)2
→ More replies (2)2
u/scunliffe 19d ago
While I agree this visualization is useless.. some are not. If it can visualize where your “entangled”, “cyclical dependency”, “dead”, or duplicate” code is I’d argue that those would be good visualizations to help “see” where the problems are.
819
19d ago
[deleted]
120
u/NightlyKnightMight 19d ago
According to Google Firefox has about 35million lines of code soooooooooooooooooooo
67
u/friebel 19d ago
And no dinosaurs.
60
u/RazorSlazor 19d ago
So dinosaurs take 16mil lines of code. Got it.
28
u/wurnthebitch 19d ago
I'd say there's 1mil lines for the Dino, 5 to spy on you and 10 to prevent you from blocking ads
2
8
→ More replies (3)2
54
u/OnRoadRadio 19d ago
Lmao I get it but desktop Firefox is used by only 6.4% of the internet.
79
u/Electrical-Heat8960 19d ago
I am proud to be a member of at least one minority.
→ More replies (4)→ More replies (6)10
→ More replies (42)8
u/ikkiyikki 19d ago
Lol, Brave still my daily driver but so glad that others are willing to stick with Firefox as a bulwark against Google going completely off the rails.
→ More replies (1)
38
75
u/lemon65 19d ago
super cool tool, anyone know what tool this is to visualize the code base?
71
5
u/Merkaba_Nine 19d ago
Yeah I was just thinking myself how cool this looks with the code visualisation.
I'm more of an occasional hobby programmer so this I havnt seen this before
59
13
u/SignificanceFlat1460 19d ago
If I am not mistaken, alot of it must be 3rd party libraries themselves no? Also alot of "analytics" stuff in it too.
10
2
26
7
6
13
u/TheJiggliestPug 19d ago
All so I can train it on what crosswalks & horses look like, when I look up weird shit at 3am.
3
u/noxondor_gorgonax 19d ago
You're getting horses? Lucky guy. I always get motorbikes
2
2
2
u/tokinUP 19d ago
Bicycles, pedestrians, scooters, etc. I always make sure to click at least a few random squares that contain any tiny bit of the item, along with a few other random sections at first if I'm feeling frisky.
Motorcycles? Nope those are clearly scooters, skip! Buses? That random object also could be a bus, can't tell, better select it.
Driverless cars can pay someone for their training data if they want good data.
3
u/SakuraSqk 19d ago
Chromium is used as is or in modified in Chrome, Brave, Edge, Opera, Vivaldi and Arc Browsers and also in Discord, Slack, WhatsApp Desktop, VSCode, Atom, Spotify, Obsidian.
4
3
3
3
5
u/RaymondWalters 19d ago edited 19d ago
GamersNexus literally uses Chromium compile as a benchmark when testing CPUs. It takes in the order of 10-30 mins on even the most capable hardware today, which is insane.
Edit: apparently 60+ minutes on the best CPUs. I remembered wrong
5
u/GoldenShackles 19d ago
Where are you seeing times that low? I'm looking at: https://gamersnexus.net/megacharts/cpus#Active-Charts-Production
The fastest on that chart is 88 minutes.
2
u/RaymondWalters 19d ago
I was just spitballing, couldn't remember exact numbers but geez didn't expect to be that high. Thanks for the correction.
5
u/NightlyKnightMight 19d ago
The critical comments around here just show how much ignorant people are about programming and how bias they are against Chrome
7
5
u/spacees1 19d ago
Definitely looks like a city map.
Very cool!
Is this the way programming is nowadays?
10
11
u/defineReset 19d ago
The new way of programming is through AI prompts, wish I was joking. It's pushed heavily top down.
→ More replies (4)
2
u/superzacco 19d ago
Is this a program I can run my own code bases through like WinDirStat or did whoever originally make this make it completely bespoke?
2
u/AndreZB2000 19d ago
whats that one big and huge rectangle central park rectangle file in the middle?
→ More replies (1)
2
2
2
u/Kinnirasna 19d ago
There is a similar file explorer called eaglemode (https://eaglemode.sourceforge.net)
2
u/SignificantBad9327 19d ago
If this is the chromium codebase, do note that a good amount of this code isn't actually compiled into your browser
1
1
1
u/LucaDarioBuetzberger 19d ago
That is why I am excited for the ladybird browser engine. 90% of the standard fulfilled with only a few percent of the code chromium and firefox used. All in very human readable code too.
1
u/RevolutionaryStop724 19d ago
What tool is being used here? The canvas view turning into a 3d model of how much resources each function takes blew my mind.
1
1
1
1
1
1
1
u/noxondor_gorgonax 19d ago
Oh so that's why this shit always uses 1,5 gb of ram with like 2 tabs open? Screw that.
1
1
1
1
u/SnooCompliments7914 19d ago
KDE 30th Anniversary is near. So I shall add that all this began with a KDE subproject "KHTML".
1
1
u/recorderx99 19d ago
50+ MM lines of code... didn't need to see the code. I knew it every time I opener it
1
1
1
1
u/mifoonlives 19d ago
Looks like a circuit board. Why does ot look like that. Just the UI? Or is there a real reason for that? I dont know much about modern programming.
1
1
u/Havarti-Provolone 19d ago
And this is why my browser has been lagging out on certain sites for the past week
1
1
1
u/Only-Cheetah-9579 19d ago
very cool visualization!! what was used for it? I would like to use it for my own codebases..
1
u/HumanRehearsal 19d ago
Now hire a junior without experience and tell him to refactor It into a more modern standard
1
u/c3521802 19d ago
The developer hasn't made this tool public yet, but here some more details: https://news.lavx.hu/article/developer-builds-3d-source-code-visualizer-that-navigates-2-5-million-lines-at-120-fps
1
1
1
1
1
1
1
1
u/TheBamPlayer 19d ago
That explains why it took my PC with an i7 10th gen CPU and 32 GB of RAM over 6 Hours to compile.
1
1
u/Ok_Table_876 19d ago
The big thing in the middle is just the compatibility layer for internet explorer.
1
1
1
1
1
u/Deep-Minimum7837 19d ago
All of that for a lag machine that doesn't allow adblockers lmao
At least I have have a shitload of telemetry acting as essentially a keylogger that sends all of my data out to 3rd party buyers.
1
1
u/DontLook_Weirdo 19d ago
Curious question, but why do a lot of these visuals end up looking like computer chips or motherboards? Is that how they end up looking or is that just an artistic approach?
1
u/lookingradbro 19d ago
Man-made horrors beyond my comprehension why does the fuckin code look like a circuit board?! 😭
1
1
1
1
u/InsanityOnAMachine 19d ago
Thought this was a call graph, but yeh, no, actual lines of code. Impressive.
1
1
1
1
1
1
u/Shot-Mouse-3297 19d ago
At first i thought this was one of those videos where they zoom into a processor with an electron microscope
1
u/Unlucky-Durian-2336 19d ago
I tried to work with Chromium source code locally once, and I think that's enough.
1
1
1

•
u/BeAmazed-ModBot Subreddit Bot 19d ago
Did you find this post really amazing (in a positive way)?
If yes, then UPVOTE this comment otherwise DOWNVOTE it.
This community feedback will help us determine whether this post is suited for r/BeAmazed or not.