What if instead of that you’d actually compile all JS files once to some sensible format that would allow you to do lookup of variable in any scope?
Then you only need token to token map to find the proper location in your precimpiled data.
> However we're different. We're not handling a single app, we're handling tens of thousands of customers and their apps and websites. We can't just have all the debug info files resident at all times, they are too many. Likewise the events we get constantly are from vastly different versions. I don't have numbers right now but I guess we store terrabytes of debug data we use for processing.
So how much do you have of it? All in all, precomputing space-efficient index and storing it in some memcached-style solution should deal with that. I bet you don’t need full debug info as in complete DWARF data.
> Ops can better attest to that but we're not huge fans of depending too much on pinning customers to single workers.
Shards can be rebalanced. Also a memcached or whatever DHTs can used to keep shards. This way workers stay uniform but lookups are still fast.