Skip to content

Improve mod loading performance on HDD by increasing read buffer size #487

Description

@raspi-dude

Is your feature request related to a problem? Please describe.
When loading mods on HDD-based servers, the mod loading process is slower than necessary due to small 4KB read buffers used during SHA256 hashing in TResourceManager.cpp (line 137).

Small buffers cause frequent small I/O operations which are inefficient on HDDs. Sequential reads with larger buffers would significantly improve performance.

Describe the solution you'd like
Increase the read buffer size from 4KB to a larger value (e.g., 1MB).

Impact

  • No breaking changes, SHA256 hashes remain identical regardless of buffer size
  • Faster mod loading, especially for large mod files
  • Better HDD utilization with sequential reads (~10x increase in speed from my testing)

Files affected

  • src/TResourceManager.cpp (line 137)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions