Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tvg-render: use bufferedReader for 10x performance boost in parsing
I took a profile of tvg-render and found that parsing the file took about 68% of the time. This was surprising as I would have expected rendering to take longer. The profile revealed that most of time was spent in the filesystem read syscalls. I've seen this problem before and the solution in the past has been to use a buffered reader rather than the file reader directly. After adding the buffered reader the parse time went from about 2 ms to about 200 microseconds (10x improvement).
- Loading branch information