Skip to content

Performance optimisations (filesystem) - #36

Open
synesissoftware wants to merge 11 commits into
perf-optimisationsfrom
perf-optimisations.fs
Open

synesissoftware wants to merge 11 commits into
perf-optimisationsfrom
perf-optimisations.fs

Conversation

@synesissoftware

Copy link
Copy Markdown
Owner

No description provided.

Define CSTRING_ASSERT once in src/internal.h, with <assert.h>, and drop the
copies in cstring.core.c and cstring.vector.c. Vector call sites use that
macro in place of CSTRING_VECTOR_ASSERT. dllmain.c includes internal.h.
Add cstring_try_get_regular_file_size_m_() as POSIX stat in fs.c and Win32
GetFileAttributesExA in fs.win.c. Declare it, plus the 64-bit integer
typedefs, in internal.h, and pick the source from src/CMakeLists.txt.
Keep fs.c common, build fs.unix.c on UNIX and fs.win.c/win.c on Win32, and
stop compiling the POSIX stat path into the Windows core.
Add cstring_try_get_stream_size_m_() with portable 64-bit/long seek/tell
selection, always restore the prior stream offset, and declare it in
internal.h.
@synesissoftware synesissoftware self-assigned this Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants