Commit Graph

7 Commits

Author SHA1 Message Date
Dery Almas e4dcf1d852 Buildsystem: Simplify format_buffer utility method
This method is used to generate headers for embedding files into the binary
(think about the new `#embed` feature in C23 and C++26).

While the stringification step itself was plenty fast, it then proceeded
to wrap everything using the `textwrap` module. `textwrap` is *very*
slow, as it's apparently optimized for human text.

This patch reimplements the wrapping logic using a simple regex,
resulting in a tremendous speed improvement (~6x), and switches to `map`
for the stringification itself (thanks Rémi!)

It also removes a (practically) unused argument, `initial_indent`.

The generated files are pretty much the same, with a tiny difference in
line length (for some reason the old logic overshot the requested line
length)
2026-04-21 23:18:42 +02:00
Thaddeus Crews be429eb404 SCons: Make builders prettier, utilize constexpr 2025-03-11 18:31:20 -05:00
Thaddeus Crews 5a6e3cbcb0 SCons: Remove run_in_subprocess dependency 2024-03-11 13:20:09 -05:00
Thaddeus Crews fb299d0fb1 SCons: Ensure with statement where applicable 2024-03-10 12:57:57 -05:00
Thaddeus Crews d9fa40f2df Enforce \n eol for Python writes
• Ensure utf-8 encoding if previously unspecified
2024-03-09 14:29:24 -06:00
Yuri Sizov 95b27fe8c7 Reorganize code related to editor theming
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.

Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.

All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
2024-01-16 11:57:45 +01:00
Yuri Sizov fd2ec47ec9 Move default theme files to scene/theme
This also puts the default theme icons into their own folder.
2023-08-28 00:23:38 +02:00