Ironed out the last performance issues with my full 2.5m line codebase explorer. 120hz awesomeness.
@rikarends9321 位关注者
1,174,756 次观看
44 条评论
评论来自 X (Twitter) 上的原帖

@JoymFL
This is really cool! Have you considered using quadtrees to render only whats visible under viewport? That would reduce struct size and give you a cache friendly layout of lookups for nearby tiles. Also, if you dont mind, what is the 21 GB alloc holding?
3 个赞

@rikarends
I think its just holding on to too many tilechaches. But without that i think it used 10gb ram so. Still not something i'd chuck in a browser.
1 个赞

@JoymFL
Ahh gotcha, and i can see the phase where the text is loaded in after a certain threshold. Pretty neat! Hope you find a DS or some way to reduce the storage, though. Would still use for sure

@rikarends
I think it parses/caches the entire codebase into ram at startup. That takes a few seconds, like 10 or so on my mac.

@HSVSphere
Wow
3 个赞

@tryingET
wow, this looks so nice! But 21 gb is quite heavy.
3 个赞

@rikarends
yea its probably tile cache i can be a bit stricter about.
3 个赞

@rikarends
or set some kind of tighter budget for

@Douglance
/goal profile this system. Must check full zoom, clicking each component, and loading or closing new filebases. Iterate and reduce memory usage without changing features.
2 个赞

@techfocusjames
This is awesome. A 2.5M line codebase rendered like a city map beats folder diving any day. 120hz makes it feel instant. What's powering the renderer? 🔥 #DevTools
2 个赞

@rikarends
It's just built on makepad my Rust gpu accel UI stack.
1 个赞

@TomaszDluski
finally we can feel like in 1995
2 个赞

@andrw_x86
Factorio
1 个赞

@neilsuperduper
Very very interesting but the memory usage is insane haha
1 个赞

@anicic_filip
You could scan the codebase once to get the structure and any metadata, then only have a file loaded/streamed and code contents render, when the camera zooms in to a certain level. Should not require so much RAM to do, even with millions of lines
1 个赞

@rikarends
No you can definitely optimise it. I mostly posted it as a 'im not sure if Web will be in range for this one'. It's just what it is now, but there are many many ways to reduce that.
1 个赞

@lucasmeijer
Very cool!
1 个赞

@rikarends
Its actually 3.4M lines of code. But it is of course doing every single render trick LOD, tilecache (realtime tho) to keep this smooth.
1 个赞

@NickADobos
I thought this was a chip design at first Wow. so cool.
1 个赞

@S1eepyP4nda
this is amoozing
1 个赞




















