I recently read this post by Nicolas Douillet about CPU caches and performance. I recommend it! Apart from being a nice, fairly easily digestable recap of how CPUs work when it comes to memory, it also taught me the existence of something I totally didn’t know about until now: the Translation Lookaside Buffer.
It’s used to cache recently used mappings between physical and virtual memory. I had no idea that this stuff was cached, and that it therefore could have some important effect on performance.
So event though I spent most of my long Easter week-end doing random cool stuff, I still got to do some nerdy stuff – namely catching up with bugs and feature requests for Gutentags, which is my most popular open-source project to date.
The main new thing is that Gutentags is now using Vim 8’s job API (job_start() and the like), with a compatibility layer for Neovim’s own, sadly different (but older), job API. This doesn’t make Gutentags any more asynchronous than it was before, since I jumped through hoops to make it work correctly even before, but it does clean up the code in a few places:
No more need for a .lock file that indicates if the background job is running. This means less chance of Gutentags getting “stuck” because the lock file was somehow left behind incorrectly by a previous crash.
No more need for polling the aforementioned lock file… we can just wait for a job to finish.
As a corollary of the previous point, it’s now easy to force-refresh Vim’s status line and get real-time, correct indication of whether Gutentags is running in the background or not. See :help gutentags-status-line for more information on this.
Because I don’t want to support 2 code paths in the same file, the requirements for Gutentags have been bumped to versions of Vim/Neovim that have the job/*jobwait features… if you need to use Gutentags with Vim 7 for some reason, you can stay on the vim7 branch, which may or may not receive some bug fixes in the future.
You can pull the latest changes from BitBucket or Github depending on which DVCS you prefer. Have fun!