Skip to content

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