A blast from the past!
This is similar in design to version 1 of Source Maps, which I prototyped
at Google in 2009. You can still see the original "parsing" code here:
https://code.google.com/p/closure-inspector/source/browse/trunk/chrome/content/inspector/sourcemap.js#136
We moved away from doing so not only because of file size concerns, but
performance as well. At the time, pulling the entire JSON object at load
time into memory was less efficient than having a string, even if we had to
parse the string to find column positions. We actually had separate JSON
objects on each textual line as a way to partly alleviate the "load entire
contents" issue.
I imagine that these concerns are somewhat still valid for extremely large
maps, but far less so today where JSON parsers are far more optimized. It
might be worth adding some benchmarks of parsing the JSON-only format vs
the current version 3 format.
Thanks,
Joey Schorr
> _______________________________________________
> dev-js-sourcemap mailing list
>
dev-js-s...@lists.mozilla.org
>
https://lists.mozilla.org/listinfo/dev-js-sourcemap
>