Devlog - Rewriting the ui arranging and fixing bad multithreading code
Fixing bad multithreading code
I spent a lot of time recently debugging and fixing issues related to the multithreading code in blank.
Most of the issues were related to missing mutex locks or use-after-frees. They would lead to random crashes at runtime
without sufficient error messages. Using Thread-Sanitizer i was able to address most of them.
Rewriting the layout arranging code
Previously, layout arranging, the process of ordering and placing elements in the ui using a given layout, relied heavily on using ratios
and relative sizes to determine the position and size of individual elements. I have now rewritten the ui element layout process to use
absolute sizes which makes the system more reliable and less prone to floating point errors. I was also able to massively simplify the process,
which will hopefully result in better performance overall.
Next up
Next, i wanna improve the memory management and rely more on arena allocators for things like ui elements and render commands. This will
probably mean including mutexes to make the allocators that are used on multiple threads thread-safe.
I also wanna improve the api (header) to use a single file rather than being split into multiple files.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.