facebook/atosl — pull request #5 by zlandau (2013-12-12 05:50:34+00:00)
Title: Caching support

This adds caching support to atosl. Basically we cache the information we read from the symbol files into a format we can read back from disk without any processing. It's sort of hacky, it could be better, but hey, it makes things faster:

```sh
$ rm -rf $HOME/.atosl-cache
$ time ./atosl -o SomeApp.app.dSYM/Contents/Resources/DWARF/SomeApp 0x12345
-[SomeAppController doneButton:] (in SomeApp) (SomeAppController.m:877)
real 0m3.463s
user 0m2.669s
sys 0m0.746s
$ ls -hl ~/.atosl-cache/
-rw-r--r-- 1 zacharyl users 9.3M Dec 11 21:48 2e8d75db26a43894b98dde4dfdb8d193
$ time ./atosl -o SomeApp.app.dSYM/Contents/Resources/DWARF/SomeApp 0x12345
real 0m1.077s
user 0m0.177s
sys 0m0.750s

Note that right now caching is the default, with --no-cache/-c to disable it. I'm not sure if this is the right thing to do, because 9.3 megs per UUID can fill up things pretty fast. On the other hand the caching will save a lot of cycles, so I dunno.