bebbo / libnix

libnix (v4): a C link library for AmigaOS/m68k
15 stars 9 forks source link

fread in ADoom extremely slow #61

Closed mheyer32 closed 1 year ago

mheyer32 commented 1 year ago

I believe 356b99f9c5a9d463211853e0da56d9b09c681d07 crippled fread's performance by making it read the files byte by byte.

The commit to change __srget to read bytewise doesn't explain why that is the right thing to do, but the function comment

int __srget(FILE stream) / Get next input block */

suggests that the function is supposed to read in blocks, not single bytes.

bebbo commented 1 year ago

oh . a side effect^^

getchar() tried to read the full buffer, before returning... ... needs a different solution then

bebbo commented 1 year ago

should be live in ~1 hour

mheyer32 commented 1 year ago

Thank you, fread works again :-)