Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up loading uncompressed bmp files #397

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

mlsomers
Copy link

Improved the speed of loading standard 24bit BMP files (and 32bit with alpha).

Instead of reading one byte at a time, reading a whole line at a time reduces allot of "context switching".
On my (slow) machine it reduced loading time from 8 minutes down to 2 minutes! (my machine is heavily swapping memory while doing the test).

@mlsomers
Copy link
Author

yikes! why is this not separated from my previous pull request?
It should only include the file bmp.cpp. The rest is for caching!

@mlsomers
Copy link
Author

Reverted all changes related to the other pull request.
Also moved conditional alpha outside the nested loops (gain was not significant).

@chris20 chris20 self-assigned this Oct 22, 2024
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