I've added a new type called StableDynarray that uses VirtualAlloc to reserve a large block of memory so that the arrays can grow without moving the array, which causes a crash. This is kind of a halfway step towards using actual arenas. I saw the todo comment to move to arenas, but that seemed like a larger change.
I'm not sure what the policy is for platform specific stuff, so I can move the VirtualAlloc calls out to a separate file if desired.
I also changed the thumbs bar to only render the thumbs that are currently visible on screen. When there are a lot of files in the directory, adding the UI buttons for all of them really tanks perf.
Resolves #44
I've added a new type called StableDynarray that uses VirtualAlloc to reserve a large block of memory so that the arrays can grow without moving the array, which causes a crash. This is kind of a halfway step towards using actual arenas. I saw the todo comment to move to arenas, but that seemed like a larger change.
I'm not sure what the policy is for platform specific stuff, so I can move the VirtualAlloc calls out to a separate file if desired.
I also changed the thumbs bar to only render the thumbs that are currently visible on screen. When there are a lot of files in the directory, adding the UI buttons for all of them really tanks perf.