Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
#line annotation costly to generate because of too much I/O #693
A whopping half the time taken by line numbers! It's because we read the file every time. We gotta have at least some sort of caching system for .ooc files being read.. or better yet, Tokens storing line numbers directly when being read.
This has been observed on Windows and it seems to have a huge impact. We have indeed a few million I/O reads (O_O) because we seek so much in files and the like.
As a temporary stopgap measure, instead of implementing a byte offset <=> line number map, we could just read whole files in memory and work from there. It'd still be stupid but a whole lot more efficient.