tsudoko / pullcord

Discord archiver
The Unlicense
60 stars 11 forks source link

LastMessageID now reads from the front of the file backwards, not back to front #29

Open Bjohnson131 opened 1 year ago

Bjohnson131 commented 1 year ago

I noticed that each time pullcord restarts, it reads an entire file from the start to finish to find the last ID.

This is bad, as TSV files can be very long, and reading an entire file can be very time consuming.

To remedy this, I made a scanner that scans files from front to back, and so the number of bytes read from the disk is reduced drastically.