r/BeAmazed • • 26d ago

Technology 51 million lines of code. Chromium codebase.

Enable HLS to view with audio, or disable this notification

7.6k Upvotes

321 comments sorted by

•

u/BeAmazed-ModBot Subreddit Bot 26d 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 26d ago

no wonder it lags like a mf

1.1k

u/blahteeb 26d ago

This is just the code to make your character jump.

417

u/Nurgeard 26d ago edited 26d 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.

135

u/PleaseMakeItSpecial 26d ago

The dinosaur still needs to jump over the cacti.

54

u/Capta-nomen-usoris 25d ago

And to duck for the pre pteredacw tperedacts BIRDS

5

u/12AngryYOLOs 25d ago

Gold this is way to low

→ More replies (1)

4

u/Nurgeard 26d 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?

10

u/PleaseMakeItSpecial 26d ago

2

u/tankerkiller125real 25d ago

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

4

u/sirreldar 26d ago

Surely

7

u/maxinfet 25d 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 25d 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

3

u/[deleted] 26d ago

[deleted]

11

u/Nurgeard 25d 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

6

u/AdrianJMartin 25d ago

you can play it with a connection too, type chrome://dino in the address bar

→ More replies (3)

8

u/[deleted] 25d ago

[removed] — view removed comment

7

u/runvnc 25d 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.

2

u/0x_coderunknown 25d 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)

25

u/3PoundsOfFlax 26d ago

Chromium is resource heavy, but it's actually really fast. Plus it's open source, so many good forks exist.

→ More replies (8)

10

u/GoldenShackles 25d 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 25d 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 25d 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)

995

u/CSouthLondon 26d 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

818

u/GreyGanado 26d ago

Every rectangle is a file with text in it. There's a lot of text that tells the browser what to do.

235

u/NeighborhoodPrior956 25d 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

18

u/DreadingAnt 25d ago

Linux kernel code next

12

u/flyingPizza456 25d ago

Upvote for badixally

That's a thing

2

u/adoodle83 25d ago

no it really isn’t.

2

u/Embarrassed-Rise-685 23d 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)

159

u/Ixaire 26d ago

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

40

u/everyoneisapotato 26d ago

Hahahaha nice reference!!

21

u/Significant-Run8172 25d ago

I appreciate the Margin Call reference

9

u/jjb0ne 25d ago

sell it all. today

4

u/AnArmoredPony 25d ago

woof woof, woof, grrr woof

3

u/JustAwesome360 25d ago

There's 51 million lines of code

51 million is a big boy number

3

u/dragon_idli 25d ago

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

2

u/Artix96 25d ago

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

→ More replies (8)

626

u/Roko_100 26d ago

Seen enough. Give this to the junior developer to find the missing bracket.

216

u/ParanoidConfidence 25d ago

63

u/TSF_Flex 25d ago

oh god

7

u/SanchoPandas 25d ago

truly terrifying

46

u/LibrarianRecent6145 25d ago

I spent 5 whole minutes looking for curly brackets missing instead of semicolons cuz my brain farted without me realising 😭

4

u/ht3k 25d ago

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

8

u/robothead 25d ago

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

3

u/whytakemyusername 25d ago

Who is this for?!?

4

u/iwenttothelocalshop 25d ago

actual goldmine

2

u/nebulous_gaze 25d ago

Why is there a Jump ?

2

u/unskilledexplorer 21d 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)

331

u/Optisoin 26d ago

This is a sophon

21

u/thisdesignup 25d 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.

12

u/Fr3shMint 25d ago

Show is trash compared to the books

3

u/Delicious_Bluejay392 25d ago edited 24d 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 24d 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)

4

u/AccNumber77 25d ago

Read the books, far better than the awful adaptation.

3

u/Gordon_Freymann 25d ago

There are books.

3

u/Ice9Coffee 25d ago

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

4

u/PhrulerApp 25d ago

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

3

u/over-lord 25d ago

Sophon having deez nutz in yo mouf

217

u/[deleted] 26d ago

[deleted]

64

u/tankerkiller125real 25d ago

We've used Gource a few times at work to "show progress" to non-tech managers/executives. Works the treat.

29

u/minequack 25d ago

That is one ugly word. My brain refuses to acknowledge it. 

2

u/ZeroAmusement 25d ago

Kinda like how you refused to acknowledge me when I gourced your mom last night

10

u/Inkjet_Printerman 26d ago

is there a code visualizer like this with visualized kdiff and version control?

6

u/[deleted] 25d ago

[deleted]

4

u/traplords8n 25d 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 25d 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 25d 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)

816

u/[deleted] 26d ago

[deleted]

119

u/NightlyKnightMight 26d ago

According to Google Firefox has about 35million lines of code soooooooooooooooooooo

71

u/friebel 26d ago

And no dinosaurs.

61

u/RazorSlazor 26d ago

So dinosaurs take 16mil lines of code. Got it.

26

u/wurnthebitch 25d 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 25d ago

Well duh, dinosaurs are extinct everyone knows that

7

u/saryndipitous 25d ago

Switch to curl everybody.

→ More replies (2)
→ More replies (3)

51

u/OnRoadRadio 26d ago

Lmao I get it but desktop Firefox is used by only 6.4% of the internet.

78

u/Electrical-Heat8960 26d ago

I am proud to be a member of at least one minority.

→ More replies (4)

9

u/mrt-e 25d 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)

9

u/ikkiyikki 25d 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 26d ago

May I have some more pixels, please?

79

u/lemon65 26d ago

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

74

u/hawk3122 26d ago

CodeCharta I believe

29

u/PeterNippelstein 26d ago

Can we see the code for it?

→ More replies (2)

5

u/Merkaba_Nine 26d 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 26d ago

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

6

u/RTobilo 25d ago

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

14

u/SignificanceFlat1460 26d ago

If I am not mistaken, alot of it must be 3rd party libraries themselves no? Also alot of "analytics" stuff in it too.

9

u/Darft 25d ago

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

2

u/devAcc123 25d ago

Just imports or includes

28

u/FuriousMosturbator 26d ago

Your Factorio world looks fucked up.

7

u/Lopsided-Wave2479 26d ago

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

5

u/stalebread_1983 25d ago

360p the perfect resolution for this kind of video lol

12

u/TheJiggliestPug 26d 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 25d ago

You're getting horses? Lucky guy. I always get motorbikes

2

u/TrippingFish76 25d ago

crosswalks moterbikes and traffic lights

2

u/FembyThePinkProot 25d ago

Get motorbikes? Lucky. I always get buses.

2

u/tokinUP 25d 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.

4

u/SakuraSqk 25d 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 25d ago

can you zoom in an out fast please

6

u/Anne1Frank 25d ago

What’s this visualisation called? Very cool.

3

u/The_DaDon 26d ago

It's a UNIX system! I know this!

3

u/KalistoCA 25d ago

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

4

u/RaymondWalters 26d ago edited 25d 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

6

u/GoldenShackles 25d 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 25d ago

I was just spitballing, couldn't remember exact numbers but geez didn't expect to be that high. Thanks for the correction.

4

u/NightlyKnightMight 26d ago

The critical comments around here just show how much ignorant people are about programming and how bias they are against Chrome

8

u/Astrosomnia 25d ago

Biased*

You have a bias. But you are biased.

5

u/spacees1 26d ago

Definitely looks like a city map.
Very cool!

Is this the way programming is nowadays?

11

u/Analgorilla 26d ago

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

12

u/defineReset 26d 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 25d 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 25d ago

whats that one big and huge rectangle central park rectangle file in the middle?

→ More replies (1)

2

u/DryLook7889 25d ago

How did you visualize a code base like that?

2

u/Friendly_devver 25d ago

Is this an IDE? That would be an awesome setup

2

u/bla2 25d ago

What visualizer is this? Looks cool!

2

u/Kinnirasna 25d ago

There is a similar file explorer called eaglemode (https://eaglemode.sourceforge.net)

2

u/SignificantBad9327 25d 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 26d ago

Seems awfully backrooms like

New lore?

1

u/Electrical-Heat8960 26d ago

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

1

u/LucaDarioBuetzberger 26d 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 26d 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 26d ago

Gemini, refactor chromium codebase

1

u/Melodic_Ad3339 26d ago

All this to play snake

1

u/awesome9001 25d ago

Imagine looking for the line thats causing an error

1

u/bernpfenn 25d ago

amazing display of a complete codebase

1

u/spyker123321 25d ago

I can do better.

Claude, make me a browser.

1

u/blackcoffee17 25d ago

Browsers are incredibly complex and will become even more so.

1

u/noxondor_gorgonax 25d 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 25d ago

Just zoomin in on imports

1

u/TheLordReaver 25d ago

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

1

u/Scrappy_Kitty 25d ago

Apparently Chimium is the base for Edge and Opera

1

u/SnooCompliments7914 25d ago

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

1

u/Pretty_Dinner_5872 25d ago

now do surf-browser from suckless.org

1

u/coldforged 25d ago

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

1

u/thatsadmotherfucker 25d ago

Developers don't work on code like this

1

u/Roklam 25d ago

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

1

u/Pibo1987 25d ago

That’s 10m more than Linux…

1

u/mifoonlives 25d 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 25d ago

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

1

u/Havarti-Provolone 25d ago

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

1

u/IAmRules 25d ago

90% of that is NPM packages.

1

u/cyxlone 25d ago

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

1

u/skip-all 25d ago

Is this the code of your vibe session this morning?

1

u/Only-Cheetah-9579 25d ago

very cool visualization!! what was used for it? I would like to use it for my own codebases..

1

u/hhh333 25d ago

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

But seriously, that's the viz tool?

1

u/tehtris 25d ago

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

1

u/Ok-Library-8397 25d ago

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

1

u/michaelprstn 25d ago

Looks like the UI from Jurassic Park

1

u/A_Neko_C 25d ago

I thought I was on r/factorio

1

u/enbits2 25d ago

On a 360p video...

1

u/Snackatttack 25d ago

ok but why would you look at code this way

1

u/majora2007 25d ago

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

1

u/Pokeasss 25d ago

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

1

u/No_Deer_5867 25d ago

what app is this called?

1

u/TheBamPlayer 25d 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 25d ago

lowkey looks like a CPU under a microscope 

1

u/Ok_Table_876 25d ago

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

1

u/TankArtist 25d ago

What tool is used to render this?

1

u/Master-Chocolate1420 25d ago

What is this software?

1

u/Everyone_Is_MC 25d ago

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

1

u/TGB_Skeletor 25d ago

this is what cyberhell is

1

u/Deep-Minimum7837 25d 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 25d ago

i wish this visual style was more common

1

u/DontLook_Weirdo 25d 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 25d ago

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

1

u/dr1nni 25d ago

name of the visualizer?

1

u/ArleezyLaFlare 25d ago

Thats beautiful tbh...Select all + Del.

1

u/InsanityOnAMachine 25d ago

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

1

u/AccomplishedKey4774 25d ago

What program?

1

u/TheGronne 25d ago

Tbf half of this is probably devtools

1

u/Minority_Carrier 25d ago

What is this visualization tool that makes code look like chips

1

u/MobileAirport 25d ago

what is this visualizer???

1

u/SivTimhel 25d ago

Did someone know the music please ?

1

u/Shot-Mouse-3297 25d 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 25d ago

I tried to work with Chromium source code locally once, and I think that's enough.

1

u/Powermatjes 25d ago

Now show GTA6

1

u/reverse-tornado 25d ago

Who in the god forsaken fuck arranged it into a fractal

https://giphy.com/gifs/kyrd72DC2Iwfu

1

u/YeezyThoughtMe 25d ago

What is this for ?