Avoid repeated reads in `get_file_metadata`
Open
- Dominant language
- Rust
- Stars
- 70
- Forks
- 34
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 25
Description
Currently `get_file_metadata` can open and read contents of the entire file twice: one for doing regex matching and one for calculating the digest. Given that I/O is probably the slowest part of the code, we should avoid it whenever possible and so the code should be refactored to open and read the file only once.
Contributor guide
Assessment
This issue has not been assessed yet.