Question I don't know the answer to: is it possible for a single binary to not load the whole code into memory before executing? I know from video games that incremental loading is a really nice way of minimizing load screens. Usually using interpreted languages.
-
Show this thread
-
Like: is it possible to only load parts of the program? Is the answer just to have multiple small programs? Feel this conceptually ties into WASM too, albeit with more obstacles (async networking, handling load errors, prefetching, limited runtime).
1 reply 0 retweets 0 likesShow this thread -
I guess this might be a general question of: "How do you make big applications memory efficient?" Or is app logic hardly the offender, and is it more about making sure we load / unload assets gradually?
2 replies 0 retweets 0 likesShow this thread -
Replying to @yoshuawuyts
You can check the loading with strace. I don't think your binary would get fully loaded so it doesn't matter if it's 5MB or 500MB. I vaguely remember that the system optimizes the process through pages and it also loads the required dynamic libs.
2 replies 0 retweets 1 like -
Replying to @ZeidMarouf @yoshuawuyts
Optimizing for memory is more about making sure you use efficient data stuctures and memory optimized (vs speed optimized) algorithms. Depending on how low level you are, it's also checking for mem leaks etc.
1 reply 0 retweets 1 like -
Replying to @ZeidMarouf @yoshuawuyts
That's why your video game example is great. They really had to do crazy things to make all their assets fit in the very limited buffers they had on hand.
1 reply 0 retweets 1 like
Awesome! Got some stuff to go off on now :D
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.