Skip navigation
Ironed out the last performance issues with my full 2.5m line codebase explorer. 120hz awesomeness.
0:00 / 0:42

Ironed out the last performance issues with my full 2.5m line codebase explorer. 120hz awesomeness.

Rik Arends

@rikarends9.3K followers

Visit on X
8,227 likesDownloadOriginal post

1,174,756 views

Ironed out the last performance issues with my full 2.5m line codebase explorer. 120hz awesomeness. Can only upload 60fps video tho. Much nicer uncompressed

44 Comments

Comments from the original post on X (Twitter)

  • ddwr's profile picture

    @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 likes

  • Rik Arends's profile picture

    @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 like

  • ddwr's profile picture

    @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

  • Rik Arends's profile picture

    @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's profile picture

    @HSVSphere

    Wow

    3 likes

  • tryingEveryThing's profile picture

    @tryingET

    wow, this looks so nice! But 21 gb is quite heavy.

    3 likes

  • Rik Arends's profile picture

    @rikarends

    yea its probably tile cache i can be a bit stricter about.

    3 likes

  • Rik Arends's profile picture

    @rikarends

    or set some kind of tighter budget for

  • Doug Lance's profile picture

    @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 likes

  • Not aToaster's profile picture

    @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 likes

  • Rik Arends's profile picture

    @rikarends

    It's just built on makepad my Rust gpu accel UI stack.

    1 like

  • Tomasz Dłuski's profile picture

    @TomaszDluski

    finally we can feel like in 1995

    2 likes

  • andrw_x86's profile picture

    @andrw_x86

    Factorio

    1 like

  • Neil Chudleigh's profile picture

    @neilsuperduper

    Very very interesting but the memory usage is insane haha

    1 like

  • Filip Aničić's profile picture

    @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 like

  • Rik Arends's profile picture

    @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 like

  • Lucas Meijer's profile picture

    @lucasmeijer

    Very cool!

    1 like

  • Rik Arends's profile picture

    @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 like

  • Nick Dobos's profile picture

    @NickADobos

    I thought this was a chip design at first Wow. so cool.

    1 like

  • Sleepy Panda's profile picture

    @S1eepyP4nda

    this is amoozing

    1 like