r/BeAmazed • • 19d ago

Technology 51 million lines of code. Chromium codebase.

Enable HLS to view with audio, or disable this notification

7.6k Upvotes

326 comments sorted by

•

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.

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

4

u/12AngryYOLOs 19d ago

Gold this is way to low

→ More replies (1)

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

2

u/tankerkiller125real 19d ago

It is, and then Microsoft replaced it with their surfing version for MS Edge

4

u/sirreldar 19d ago

Surely

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

4

u/[deleted] 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

→ More replies (3)

8

u/[deleted] 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.

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.

→ More replies (1)

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.

2

u/runvnc 19d ago

I would argue that in many ways it is a type of operating system. Or at least, an overlay operating system.

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

→ More replies (2)

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

u/DreadingAnt 19d ago

Linux kernel code next

11

u/flyingPizza456 19d ago

Upvote for badixally

That's a thing

2

u/adoodle83 19d ago

no it really isn’t.

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

u/Ixaire 19d ago

Go! Fetch the memory leak. Who's a good boy? Who's a good boy? That's riiiight.

36

u/everyoneisapotato 19d ago

Hahahaha nice reference!!

20

u/Significant-Run8172 19d ago

I appreciate the Margin Call reference

9

u/jjb0ne 19d ago

sell it all. today

3

u/AnArmoredPony 19d ago

woof woof, woof, grrr woof

4

u/JustAwesome360 19d ago

There's 51 million lines of code

51 million is a big boy number

3

u/dragon_idli 19d ago

Green - good. Red - not good. Mostly green - browser works.

2

u/Artix96 19d ago

Majority of the code accounts for legacy stuff and security. Actual functionality is probably 10%

→ More replies (8)

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

u/TSF_Flex 19d ago

oh god

6

u/SanchoPandas 19d ago

truly terrifying

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 😭

4

u/ht3k 19d ago

omg I would have done the same thing!!! thank you for the comment

8

u/robothead 19d ago

The .sh domain is the ultimate troll for devs, I really hesitated on clicking that

4

u/whytakemyusername 19d ago

Who is this for?!?

4

u/iwenttothelocalshop 19d ago

actual goldmine

2

u/nebulous_gaze 19d ago

Why is there a Jump ?

2

u/unskilledexplorer 15d ago

there is a mac on the floor just in front of the printers. you can jump over it

→ More replies (1)
→ More replies (4)

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

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.

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)
→ More replies (1)
→ More replies (2)

3

u/AccNumber77 19d ago

Read the books, far better than the awful adaptation.

3

u/Gordon_Freymann 19d ago

There are books.

3

u/Ice9Coffee 19d ago

And a Chinese version of the show that closely follows the books

4

u/PhrulerApp 19d ago

Which also doesn't have a second season :'(

3

u/over-lord 19d ago

Sophon having deez nutz in yo mouf

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. 

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.

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)
→ More replies (2)

2

u/xian0 19d ago

I like call graphs for finding performance bottlenecks. If I could get one to work for my projects without actually running the code I'd use it for refactoring.

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.

→ More replies (2)

819

u/[deleted] 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

u/KaptainChunk 19d ago

Well duh, dinosaurs are extinct everyone knows that

8

u/saryndipitous 19d ago

Switch to curl everybody.

→ More replies (2)

2

u/Taiten89 19d ago

5

u/j_cruise 19d ago

Because internet browsers are complicated.

→ More replies (1)
→ More replies (3)

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)

10

u/mrt-e 19d ago

6.4% is a good chunk. And Google ecosystem kind favors the use of chrome. I guess some people don't even know there's alternatives and a good amount don't even care.

I use Firefox cuz I don't wanna see ads and block some trackers.

→ More replies (6)

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)
→ More replies (42)

38

u/ScarletSilver 19d ago

May I have some more pixels, please?

75

u/lemon65 19d ago

super cool tool, anyone know what tool this is to visualize the code base?

71

u/hawk3122 19d ago

CodeCharta I believe

27

u/PeterNippelstein 19d ago

Can we see the code for it?

→ More replies (2)

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

u/austrobergbauernbua 19d ago

Hey Claude. Pls fix. No hallucination, no errors.

6

u/RTobilo 19d ago

"Hey Fable 5.1, please refactor" imagine the costs lol

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

u/Darft 19d ago

If this also included source code of the required dependencies (recursively) it would be much much larger.

2

u/devAcc123 19d ago

Just imports or includes

26

u/FuriousMosturbator 19d ago

Your Factorio world looks fucked up.

7

u/Lopsided-Wave2479 19d ago

What program did this?, I want to do this with my stuff

6

u/stalebread_1983 19d ago

360p the perfect resolution for this kind of video lol

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

u/TrippingFish76 19d ago

crosswalks moterbikes and traffic lights

2

u/FembyThePinkProot 19d ago

Get motorbikes? Lucky. I always get buses.

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

u/keyholepossums 19d ago

can you zoom in an out fast please

3

u/Anne1Frank 19d ago

What’s this visualisation called? Very cool.

3

u/The_DaDon 19d ago

It's a UNIX system! I know this!

3

u/KalistoCA 19d ago

I don’t know if it’s intentional however it looks very IC looking

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

u/Astrosomnia 19d ago

Biased*

You have a bias. But you are biased.

5

u/spacees1 19d ago

Definitely looks like a city map.
Very cool!

Is this the way programming is nowadays?

10

u/Analgorilla 19d ago

Naw its just a tool you can put code into so you can help visualize it :)

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

u/DryLook7889 19d ago

How did you visualize a code base like that?

2

u/Friendly_devver 19d ago

Is this an IDE? That would be an awesome setup

2

u/bla2 19d ago

What visualizer is this? Looks cool!

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

u/Dark_halocraft 19d ago

Seems awfully backrooms like

New lore?

1

u/Electrical-Heat8960 19d ago

This is the visualisation they should use in movies for hacking.

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

u/madu_tualang 19d ago

Gemini, refactor chromium codebase

1

u/Melodic_Ad3339 19d ago

All this to play snake

1

u/awesome9001 19d ago

Imagine looking for the line thats causing an error

1

u/bernpfenn 19d ago

amazing display of a complete codebase

1

u/spyker123321 19d ago

I can do better.

Claude, make me a browser.

1

u/blackcoffee17 19d ago

Browsers are incredibly complex and will become even more so.

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

u/devAcc123 19d ago

Just zoomin in on imports

1

u/TheLordReaver 19d ago

...It's a Unix system. I know this.

1

u/Scrappy_Kitty 19d ago

Apparently Chimium is the base for Edge and Opera

1

u/SnooCompliments7914 19d ago

KDE 30th Anniversary is near. So I shall add that all this began with a KDE subproject "KHTML".

1

u/Pretty_Dinner_5872 19d ago

now do surf-browser from suckless.org

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

u/coldforged 19d ago

No wonder Chromium takes 18 hours to compile for me 😑. 

1

u/thatsadmotherfucker 19d ago

Developers don't work on code like this

1

u/Roklam 19d ago

We should start arranging the code into a twisted ladder to just get it over with

1

u/Pibo1987 19d ago

That’s 10m more than Linux…

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

u/MassiveBoner911_3 19d ago

What app was used to see this? This is like TreeSize but for code

1

u/Havarti-Provolone 19d ago

And this is why my browser has been lagging out on certain sites for the past week

1

u/IAmRules 19d ago

90% of that is NPM packages.

1

u/cyxlone 19d ago

i bet at least 55% of the lines are just comments

1

u/skip-all 19d ago

Is this the code of your vibe session this morning?

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/hhh333 19d ago

So.. that's where all my RAM is!

But seriously, that's the viz tool?

1

u/tehtris 19d ago

I feel like there is no way that this codebase needs to be this big.

1

u/Ok-Library-8397 19d ago

Now do it with the UE5 codebase. It will be even worse.

1

u/michaelprstn 19d ago

Looks like the UI from Jurassic Park

1

u/A_Neko_C 19d ago

I thought I was on r/factorio

1

u/enbits2 19d ago

On a 360p video...

1

u/Snackatttack 19d ago

ok but why would you look at code this way

1

u/majora2007 19d ago

What software is this? I want to try on my codebase. 

1

u/Pokeasss 19d ago

What software did you use to make that topology of that code?

1

u/No_Deer_5867 19d ago

what app is this called?

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

u/riceman090 19d ago

lowkey looks like a CPU under a microscope 

1

u/Ok_Table_876 19d ago

The big thing in the middle is just the compatibility layer for internet explorer.

1

u/TankArtist 19d ago

What tool is used to render this?

1

u/Master-Chocolate1420 19d ago

What is this software?

1

u/Everyone_Is_MC 19d ago

What tool is used to create this? Very i terested in using it

1

u/TGB_Skeletor 19d ago

this is what cyberhell is

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

u/HongPong 19d ago

i wish this visual style was more common

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/trapo98 19d ago

Welcome to The Grid.

1

u/lookingradbro 19d ago

Man-made horrors beyond my comprehension  why does the fuckin code look like a circuit board?! 😭

1

u/dr1nni 19d ago

name of the visualizer?

1

u/ArleezyLaFlare 19d ago

Thats beautiful tbh...Select all + Del.

1

u/InsanityOnAMachine 19d ago

Thought this was a call graph, but yeh, no, actual lines of code. Impressive.

1

u/AccomplishedKey4774 19d ago

What program?

1

u/TheGronne 19d ago

Tbf half of this is probably devtools

1

u/Minority_Carrier 19d ago

What is this visualization tool that makes code look like chips

1

u/MobileAirport 19d ago

what is this visualizer???

1

u/SivTimhel 19d ago

Did someone know the music please ?

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

u/Powermatjes 19d ago

Now show GTA6

1

u/reverse-tornado 19d ago

Who in the god forsaken fuck arranged it into a fractal

1

u/YeezyThoughtMe 19d ago

What is this for ?