kevinjycui / bad-apple

Code from my Bad Apple!! YouTube videos
https://www.youtube.com/playlist?list=PLsTVaNk5lQHmRy51gyAsVN16DHpv0gcfE
828 stars 107 forks source link

Loading of files into memory #7

Closed Jark5455 closed 2 years ago

Jark5455 commented 3 years ago

I know this is a meme and stuff, but I was wondering why you would load all of the images into memory before running, instead of using a BufferedReader

toydotgame commented 3 years ago

With such a downscaled version of the Bad Apple!! video being used, this wouldn't be much of a problem for using too much memory. Possibly it's just a bit faster to load it all at the start rather than as you go along. These things take ages to execute, anyway.

Jark5455 commented 3 years ago

@toydotgame, really, I thought memory was the biggest issue that was causing the low performance, my system reported ~8 GiB memory usage, and most was forced onto a swap file.

toydotgame commented 3 years ago

Which specific port is this? I've run a few from this repo on my Arch box and I've had only a few megabytes used.

kevinjycui commented 2 years ago

It just hasn't ever been an issue for me. Loading them on Ubuntu or Windows (especially when they are downscaled bitmaps) hasn't had a real effect on performance. Sorry for the late response.